From 306a1ec0a4dd037a59ab869f301546f7646a8ebe Mon Sep 17 00:00:00 2001 From: Carlosgg Date: Thu, 22 Oct 2020 16:59:17 +0100 Subject: [PATCH] apps: Add music player app with GadgetBridge support Signed-off-by: Carlos Gil [daniel@redfelineninja.org.uk: fix regressions on simulator, disable by default (for now) on real hardware and remove a couple of whitespace changes to existing files] Signed-off-by: Daniel Thompson --- README.rst | 6 +- res/MusicPlayerApp.png | Bin 0 -> 8324 bytes res/headset.png | Bin 0 -> 624 bytes res/pause.png | Bin 0 -> 953 bytes res/play.png | Bin 0 -> 1030 bytes wasp/apps/musicplayer.py | 190 ++++++++++++++++++++++++++++++++ wasp/boards/manifest_240x240.py | 1 + wasp/gadgetbridge.py | 12 +- wasp/icons.py | 133 ++++++++++++++++++++++ wasp/wasp.py | 8 ++ 10 files changed, 345 insertions(+), 5 deletions(-) create mode 100644 res/MusicPlayerApp.png create mode 100755 res/headset.png create mode 100755 res/pause.png create mode 100755 res/play.png create mode 100644 wasp/apps/musicplayer.py diff --git a/README.rst b/README.rst index 351ef15..8b0f9d9 100644 --- a/README.rst +++ b/README.rst @@ -160,5 +160,9 @@ using one of the techniques is the Application Writer's guide. :width: 179 .. image:: res/LifeApp.png - :alt: Game of Life runnin in the wasp-os simulator + :alt: Game of Life running in the wasp-os simulator + :width: 179 + +.. image:: res/MusicPlayerApp.png + :alt: Music Player running in the wasp-os simulator :width: 179 diff --git a/res/MusicPlayerApp.png b/res/MusicPlayerApp.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6b7e3db47dc26d4c0725b55f06e99c4d2f41c5 GIT binary patch literal 8324 zcmb7K2UJsCmrW=kB8UixfHW0pA|0fI0xG?QUIl^#0i|~kq$619AP7iH2)#%z76d}* zfrKU^y-6>j%;WoK{xb8=nl)MLtt9uJdtdIo@0`8Q*@@QCdPq&lObG&ks2@L4)&qgS zaNtUYLVy^UAg z+c?v z;kNS)26Sz-CcWb%&4neiTM&&5<+rJ(jt}^m>Cj`!1E)Vbi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y1JpY>G777F%5icS6he|F!cSd#%1dZ{s8u{8? S5B!4w^jJkpx%9qu=zjp%L&HM= literal 0 HcmV?d00001 diff --git a/res/headset.png b/res/headset.png new file mode 100755 index 0000000000000000000000000000000000000000..4cdc52b30535fe1ed32bf5bceb80788029e31f84 GIT binary patch literal 624 zcmV-$0+0QPP)c3@U?_@U7=mCZU;7-=MyWE}c0f6uFUXuKO@+S!)v<`OA!#CVuj3>-7#{_q{#t`Rt*Y+p}7+~UU zQaqrKy*7n8!&LDeanj^4T}+hk9!E_IvyZWArMSgT-Q%2KX>(?^eKz3&=_?=12$wiR z2m9DZ7w72X1`Gdhh0{8P*}~`*QHF21%jn<=OY5Z=)Fsf3^_IB6Rsr+2F~E!UHX8|- z*5An?wo91(9wY1LpKdD7N2KyC(XD8mwUTdzqfM-e|H$_n`$u&N|yk5lyAC; zeG_)qM7m9?fKT!*H@Q#3F;=prII7|!eJa~ubZW8p%XeS)@XzvnNooQk`A*6lJeO^T ztr`V-j~Ce<%iEpj>m@aVfqZ*q4E!$JG^rtMV<}s|jDa)RE|QwUm23}14?2`@x5j}w zvZaNt)$moeNm6rI$aY@jkRLVJEf@W5!?4I9_p+TfAW&bn>mrBzlI=qS0-eitSHL!BG979K+6^edMYx|xP^g6MF#4%Fi@xH)2+`f3iMFcVWhMLfnIP>=1GaP z!GTujR&lKDxq*S6a9HJ^=z17qS>r$p{KRR}7$JlZLI@#*5dHyNLLD$``%KX+W*d+^L@uTNu$wdG#ZW1z!nbCLmzi|z!+nUaEnX)#344m zav)3CMISH9`-^kze3f9n;ToySKC~ z45y7z{7E$WB5;S+yu(?>gZB;4NoE9_`0agn^A2dB*kqo?9QKe_;&sERVoz9GP*FNo zVCEAyy2#|aK`U7htm0n26q~c0lvDYxE7bQDh4eC$ViJA%9;;NrVijZgPLr6>K_+a1 zc10WIRM=b8-VJxcGHfLkg+2K$k{GZp-(^y91$ELi%2o-6!qU&aTEay6d~q?E3G2t$ zzQ~FSuc`-BT-bX3zX2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