From b0eb5f6971c0c8347d71d2169742b40593ef68ef Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sun, 12 Nov 2023 08:12:09 +0000 Subject: [PATCH] Squashed 'gpio_reader_b/' changes from 6134c07af..c245ee989 c245ee989 move and cli bridge REVERT: 6134c07af Merge pull request #3 from garsaud/patch-1 REVERT: cfd72e9c7 Rotate ArrowUp icons instead of using now-defunct ArrowDown REVERT: 614f794c6 Add install instructions REVERT: 9491eb006 Add image to readme REVERT: 740fe2332 Add the whole app REVERT: 15a4a3388 Update README.md REVERT: c1cc62ac9 Initial commit git-subtree-dir: gpio_reader_b git-subtree-split: c245ee9890d4cdb1b9e21cb69841df2b260c8fcc --- application.fam | 8 ++++---- gpio_app_i.h | 2 +- gpio_item.c | 2 +- icon.png | Bin 0 -> 135 bytes icons/ActiveConnection_50x64.png | Bin 0 -> 3842 bytes icons/ArrowUpEmpty_14x15.png | Bin 0 -> 3616 bytes icons/ArrowUpFilled_14x15.png | Bin 0 -> 3628 bytes img/1.png | Bin 0 -> 1841 bytes img/2.png | Bin 0 -> 1859 bytes scenes/gpio_scene_start.c | 4 ++-- views/gpio_reader.c | 32 ++++++++++++++----------------- views/gpio_reader.h | 5 ++++- 12 files changed, 26 insertions(+), 27 deletions(-) create mode 100644 icon.png create mode 100644 icons/ActiveConnection_50x64.png create mode 100644 icons/ArrowUpEmpty_14x15.png create mode 100644 icons/ArrowUpFilled_14x15.png create mode 100644 img/1.png create mode 100644 img/2.png diff --git a/application.fam b/application.fam index 365d2491232..787bd60d5cd 100644 --- a/application.fam +++ b/application.fam @@ -1,12 +1,12 @@ App( - appid="gpioreader", - name="GPIO Reader", + appid="gpioreader2", + name="[GPIO] Input Reader 2", apptype=FlipperAppType.EXTERNAL, entry_point="gpio_app", - cdefines=["APP_GPIOREADER"], requires=["gui"], stack_size=1 * 1024, order=50, - fap_libs=["assets"], fap_category="GPIO", + fap_icon="icon.png", + fap_icon_assets="icons", ) diff --git a/gpio_app_i.h b/gpio_app_i.h index 52f76949d8b..0023d1e508d 100644 --- a/gpio_app_i.h +++ b/gpio_app_i.h @@ -16,7 +16,7 @@ #include "views/gpio_test.h" #include "views/gpio_reader.h" #include "views/gpio_usb_uart.h" -#include +#include struct GpioApp { Gui* gui; diff --git a/gpio_item.c b/gpio_item.c index f516bd25875..4d7f056ba2f 100644 --- a/gpio_item.c +++ b/gpio_item.c @@ -26,7 +26,7 @@ void gpio_item_configure_pin(uint8_t index, GpioMode mode, GpioPull pull) { void gpio_item_configure_all_pins(GpioMode mode) { GpioPull pull = GpioPullNo; - if(mode == GpioModeInput){ + if(mode == GpioModeInput) { pull = GpioPullDown; } for(uint8_t i = 0; i < GPIO_ITEM_COUNT; i++) { diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..201d033e74e36c5488a571920b3fee257c3e03ad GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>vG;Uw4ABTq z{`3F;|9Uo+11C;!JX^?VY;Y+|@l4bV?+I(&H_rOSZdngu5+k1a4|d9Bh_Z irt#1_$AXE$%-QMLBh#tYK%*EuUHx3vIVChPFaQ90iY%J| literal 0 HcmV?d00001 diff --git a/icons/ActiveConnection_50x64.png b/icons/ActiveConnection_50x64.png new file mode 100644 index 0000000000000000000000000000000000000000..1d7686dddf8a33b724c7528ed36435514b7518b2 GIT binary patch literal 3842 zcmaJ@c|278_rI3PzAvFNMm&{e7)wmXzKj~%*ehv_!7y86EF(lkN?EdHO(@h*N=UY3 zZ7fkFOO`ANjU^;YzwvyZp6~CEU%&f$-FwgH-1qx^&gYzS@9SQ-wYK2rk>&vafZq~f zielZNtkaN-gLNhGzPAJb9uu62iLIrH35ZM~dExL_00Y=T+{c5+j+w|kQsr%QBj$9h<5`_= zvcrYX!$Oz~3!5J{Yi6=$wz_EDf)T3YU<@oW!^@U{0@_p^+Qfji z{lF9ZXP!JjG63Ldp~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E zCT6+_J}P)G#O-=~J*|6Ggy zANl^ldi}W;lRsi1tYRR$v;AMQ{_SE3XxIE#x~$E=;>QtLil?xo?Vc;=&-yI(*jqcA z|N8ZdWjfWr4`(e9D>D;E+JL7Az+qvrN2!k60%@RRsHn&5CR`~D5>QlZ7m?!Y*yl&d d1DZLxp@7f`psMbvsmg)^R_3;5rKTR2{|5)YPeT9z literal 0 HcmV?d00001 diff --git a/icons/ArrowUpFilled_14x15.png b/icons/ArrowUpFilled_14x15.png new file mode 100644 index 0000000000000000000000000000000000000000..fa35eb2f827bbf3b125673521e94c40ace83f035 GIT binary patch literal 3628 zcmaJ@c{r49+rMpP$&!5uW5m;f8CzvCwjra)G`3MGV+;nfGzK%0l$4S!Th@d~4QwO&8b<}ZdQDH@4002a7kd|of zD#m@q1^Kw&k!GdqqOhtUfYI*jZX;XC~6A?sAtfGAn90XAjHU{6^HtXs6SMzN_{Z zKEDvcnVDJrxLPrhIkDEpXcrIPDXEz-p6d%3p(Bl9J*si`$hxM=a9$bYAU{ZAoL%cJ zP!9mJd<=RR?Xl?^&m%Ix3sAarc1t!4ZAO%%G+h8t0x$@coDkuOM+1#Ij*Zelqdf4~ z;hCo}kOTn!j8F?O@IVxp{%K<(0Q3|k_R9f1xx0!4ffybjZIAVCUb9z#yVE7K7H>^0 zki#?s>+si<@Pxa*(6i7KOHN+Yn^R3$7fK8k1(;XuYmUFz{+#V!6ZV~lH(CtS83dSx&1>IO6iEOi zybbgiO8}5qy&Pw@p9g47%^v}Pim&pg?&A`dib9|=2OhsnLZ>@`dasp=)|Dp=}S`-xoz(9 z*|qW&SB3b^8wI7XYOtuC9(HbJ?xSbi`TX>cn%A2b;yeF9wHNX_RhvhYoCL#qGK zrb-*doHkpD?`s6<-B`O(VXd2V>FEi+54?e9FYl`=-gui6&_Od0cMDI+_3Kb9Re^`U z$Sv$R_BD_OT(}X73-8bs^Sb#7d-~=zEBEUdMa>3T+!)5tInEHLj5!!2qg0cP`@CL(u>HQgFLF07^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TLFqX%=EOeK`WLQ0R;oq&{()d8X5k+qD!rJ6s1@VQb&nZV52IJ zZ+IGjV<@-J&FdR84DNYaYgDJALwfGba}+uybd!Ve5lyJOP-Dlrj3nN&jS;@*ZwQ6z^ZM*%k{V^|uo*|dlqX7cv z8hcY$Qy-=jl(mKUpxOr%%`U}?p#?{q729{$2v(5o4*plLL=GbY8iLz2hv~sg>e-UM z7mXCEcd)Lx&DZ&;Aw!8f@w$#Br|u36UxFoJa7K+R2^FVCm69PF2K`JnG1Km-m8y-p zMYjEjTUpD;QEuR^>Uz91+w1ZRUur}Wq39}QKk>vjerzg$l9sf)kx3*!WyuXp+eypX5IDNK1 z;&5E+2rt%hIA!N?{jtG^#(RUE>utWY%J0is_|z}Gf{|S#E=ej=o0;)O8QBT1GTxJK zJQ#F8r0&W+{K=2Yk1s4HFxf zIyM^=O6VC`D}Lhd(_5WrikGQIUEs(=)}f2=!3?PZEzmV!Mz{8EK1(v^q+8GDPun#K zZ`Vh9u-jQvmYq0LbO>J*F3&d2?ZgxErlG4c_<}0oh~S2b9P+||<1(scene_manager, GpioSceneStart, GpioItemUsbUart); if(!furi_hal_usb_is_locked()) { - DOLPHIN_DEED(DolphinDeedGpioUartBridge); + dolphin_deed(DolphinDeedGpioUartBridge); scene_manager_next_scene(app->scene_manager, GpioSceneUsbUart); } else { scene_manager_next_scene(app->scene_manager, GpioSceneUsbUartCloseRpc); diff --git a/views/gpio_reader.c b/views/gpio_reader.c index 95a425fda1c..4b3a18f8e41 100644 --- a/views/gpio_reader.c +++ b/views/gpio_reader.c @@ -26,32 +26,25 @@ static void gpio_reader_draw_callback(Canvas* canvas, void* _model) { canvas_set_font(canvas, FontSecondary); elements_multiline_text_aligned( canvas, 64, 16, AlignCenter, AlignTop, "A7 A6 A4 B3 B2 C3 C1 C0"); - elements_multiline_text_aligned( - canvas, 64, 40, AlignCenter, AlignTop, "Pull Up"); + elements_multiline_text_aligned(canvas, 64, 40, AlignCenter, AlignTop, "Pull Up"); int charOffset = 10; for(uint8_t i = 0; i < GPIO_ITEM_COUNT; i++) { bool high = gpio_item_get_pin(i); if(high) { - elements_multiline_text_aligned( - canvas, charOffset, 25, AlignCenter, AlignTop, "1"); + elements_multiline_text_aligned(canvas, charOffset, 25, AlignCenter, AlignTop, "1"); } else { - elements_multiline_text_aligned( - canvas, charOffset, 25, AlignCenter, AlignTop, "0"); + elements_multiline_text_aligned(canvas, charOffset, 25, AlignCenter, AlignTop, "0"); } - + if(model->pullUp[i]) { - elements_multiline_text_aligned( - canvas, charOffset, 50, AlignCenter, AlignTop, "1"); + elements_multiline_text_aligned(canvas, charOffset, 50, AlignCenter, AlignTop, "1"); } else { - elements_multiline_text_aligned( - canvas, charOffset, 50, AlignCenter, AlignTop, "0"); + elements_multiline_text_aligned(canvas, charOffset, 50, AlignCenter, AlignTop, "0"); } if(i == model->pin_idx) { - elements_multiline_text_aligned( - canvas, charOffset, 53, AlignCenter, AlignTop, "_"); + elements_multiline_text_aligned(canvas, charOffset, 53, AlignCenter, AlignTop, "_"); } - charOffset += 16; } //~ free(charOffset); @@ -93,7 +86,7 @@ static bool gpio_reader_process_right(GpioReader* gpio_reader) { gpio_reader->view, GpioReaderModel * model, { - if(model->pin_idx < GPIO_ITEM_COUNT-1) { + if(model->pin_idx < GPIO_ITEM_COUNT - 1) { model->pin_idx++; } }, @@ -109,11 +102,11 @@ static bool gpio_reader_process_ok(GpioReader* gpio_reader, InputEvent* event) { GpioReaderModel * model, { if(event->type == InputTypePress) { - if(model->pullUp[model->pin_idx]){ + if(model->pullUp[model->pin_idx]) { gpio_item_configure_pin(model->pin_idx, GpioModeInput, GpioPullDown); model->pullUp[model->pin_idx] = 0; consumed = true; - }else{ + } else { gpio_item_configure_pin(model->pin_idx, GpioModeInput, GpioPullUp); model->pullUp[model->pin_idx] = 1; consumed = true; @@ -149,7 +142,10 @@ View* gpio_reader_get_view(GpioReader* gpio_reader) { return gpio_reader->view; } -void gpio_reader_set_ok_callback(GpioReader* gpio_reader, GpioReaderOkCallback callback, void* context) { +void gpio_reader_set_ok_callback( + GpioReader* gpio_reader, + GpioReaderOkCallback callback, + void* context) { furi_assert(gpio_reader); furi_assert(callback); with_view_model( diff --git a/views/gpio_reader.h b/views/gpio_reader.h index d027d013887..a59618d57ca 100644 --- a/views/gpio_reader.h +++ b/views/gpio_reader.h @@ -11,4 +11,7 @@ void gpio_reader_free(GpioReader* gpio_reader); View* gpio_reader_get_view(GpioReader* gpio_reader); -void gpio_reader_set_ok_callback(GpioReader* gpio_reader, GpioReaderOkCallback callback, void* context); +void gpio_reader_set_ok_callback( + GpioReader* gpio_reader, + GpioReaderOkCallback callback, + void* context);