7fffd33e3aRemove dup library in mos.yml; cast 'value' to bool in Relay.Set()
master
Pim van Pelt
2018-01-05 01:43:38 +01:00
71410fee91Update screens to use new MQTT format.
Pim van Pelt
2018-01-02 00:21:38 +01:00
9dbf9be428Simplify MQTT messaging
Pim van Pelt
2018-01-02 00:20:15 +01:00
0ea78abf4cAdd extra debounce delay in button presses. Trigger on button-up.
Pim van Pelt
2018-01-02 00:19:37 +01:00
a342ff6815Add 3D printable objects:
Pim van Pelt
2018-01-02 00:18:32 +01:00
67bc9b9d23Simplify MQTT structure
Pim van Pelt
2017-12-22 21:38:19 +01:00
da963f46f5add missing include
Pim van Pelt
2017-12-22 21:37:37 +01:00
0dae252eb4Add device_id to widget_name.c
Pim van Pelt
2017-12-22 17:13:35 +01:00
ecf0a9a2fcAdd tft.enable flag, gate the use of ILI9341/STMPE610 on it. - For esp8266 (lightswitch w/o touchscreen), set tft.enable=false - For esp32 (lightswitch w/ touchscreen), set it to true.
Pim van Pelt
2017-12-22 10:23:15 +01:00
44a84dd1bcFix some compiler lint for esp8266
Pim van Pelt
2017-12-21 22:38:23 +01:00
4b4642416fAdd unit tests for buttons / relays; and a bunch of mocks :)
Pim van Pelt
2017-12-20 17:32:28 +01:00
1cbd2130dbAdd lightswitch to this firmware
Pim van Pelt
2017-12-20 17:04:51 +01:00
7ba19c8372Make screen work at 480x320 as well as 320x240
Pim van Pelt
2017-12-07 01:28:27 +01:00
7c3f699275Make widgets span the get_screenWidth() value
Pim van Pelt
2017-12-07 00:00:13 +01:00
f598290e54Add (private) OTA libs
Pim van Pelt
2017-12-03 23:56:16 +01:00
135f9033aaTest commit
Pim van Pelt
2017-12-03 23:43:57 +01:00
84ff733bbbCall mgos_ili9341_set_rotation(); Reduce inactivity_timeout to 10s
Pim van Pelt
2017-12-03 14:12:34 +01:00
d538533b23Update mos.yml
Pim van Pelt
2017-12-03 13:46:45 +01:00
0bede8cca6fix typo
Pim van Pelt
2017-12-03 12:45:59 +01:00
0628cf59a6Remove the text that comes from huzzah32-featherwing
Pim van Pelt
2017-12-03 12:45:15 +01:00
84dfb7c516Register prometheus callback only once
Pim van Pelt
2017-12-02 23:49:53 +01:00
fae52bb543Add MQTT buttons!
Pim van Pelt
2017-12-02 23:34:16 +01:00
2b756cee3dAdd 'mqtt' field -- a \001 delimited string of topics+messages to send
Pim van Pelt
2017-12-02 21:29:42 +01:00
b8e5637c8bFirst start of MQTT buttons
Pim van Pelt
2017-12-02 16:51:09 +01:00
c315de560fFix non-void return in screen_widget_broadcast()
Pim van Pelt
2017-12-02 15:33:56 +01:00
cda842da53Implement EV_WIDGET_DRAW and call screen_widget_broadcast() on screen loads
Pim van Pelt
2017-12-02 14:23:14 +01:00
f7a62fce48Add screen_widget_broadcast()
Pim van Pelt
2017-12-02 14:18:54 +01:00
ef4451b81fInitial stab at WIDGET_LOADSCREEN and navigation
Pim van Pelt
2017-12-02 14:15:22 +01:00
980ac4c7cfRemove 'user_data' arg from widget_set_handler
Pim van Pelt
2017-12-02 13:42:32 +01:00
5a283bd87fSet w->user_data to 'screen' for type=WIDGET_TYPE_LOADSCREEN
Pim van Pelt
2017-12-02 13:37:00 +01:00
c3a71a9b69Add widget_default_destroy()
Pim van Pelt
2017-12-02 13:33:51 +01:00
4e1a9f4c2aChange images to DIFs for faster drawing
Pim van Pelt
2017-12-02 12:22:14 +01:00
ff84c5aa4bFix typo
Pim van Pelt
2017-12-01 19:22:44 +01:00
b9a0578d5bAllow app to compile for ESP8266 - add some conditionals based on mos.platform
Pim van Pelt
2017-12-01 19:21:01 +01:00
95e2835871Draw images as blue roundrects; Add labels to non-imagery widgets, if they are set
Pim van Pelt
2017-12-01 16:16:57 +01:00
01bbb5d363Update README that we're using Mongoose OS's native SPI driver
Pim van Pelt
2017-12-01 15:47:02 +01:00
e7f674fa6fShow the use of multiple fonts
Pim van Pelt
2017-12-01 15:43:03 +01:00
eab5f31a92Move to Native SPI implementations of ILI9341 and STMPE610
Pim van Pelt
2017-12-01 13:57:43 +01:00
5b80d88b86Extend keepalive if the user is currently touching the screen -- this avoids the screen fading out on presses longer than the inactivity timeout
Pim van Pelt
2017-11-28 15:58:46 +01:00
af23ddee37Add mgos_stmpe610_is_touched() to let callers know if the user is pressing the screen at this moment
Pim van Pelt
2017-11-28 15:57:59 +01:00
1ef7195728Update README with the new backlight implementation details
Pim van Pelt
2017-11-28 15:42:52 +01:00
7041526a39Small formatting changes; Set backlight on before SMTPE610
Pim van Pelt
2017-11-28 15:32:54 +01:00
9fc40fd800New implementation of backlight based on persistent keepalive timer, rather than oneshot timer
Pim van Pelt
2017-11-28 15:32:27 +01:00
c35d959c1aRewrite widget_battery_render() to assume full at 4100mV, clipping 'h' between [0,12]
Pim van Pelt
2017-11-28 10:26:29 +01:00
801e4435ceCall battery 'full' at 4100mV
Pim van Pelt
2017-11-28 09:01:13 +01:00
4b851ef144Measured the MCU to shut off at 3500mV -- update widget_battery() to match what I saw
Pim van Pelt
2017-11-28 07:02:33 +01:00
d01f9f81c9Add Youtube video
Pim van Pelt
2017-11-28 01:40:25 +01:00
1aa76602b3Fix typo in image name
Pim van Pelt
2017-11-28 01:35:09 +01:00
43c842ccfaAdd picture illustrating the soldering done
Pim van Pelt
2017-11-28 01:34:29 +01:00
fac8d3b593Add soldering requirements
Pim van Pelt
2017-11-28 01:15:00 +01:00
6d3b693850Fix some typos, add some clarifying language.
Pim van Pelt
2017-11-28 01:06:07 +01:00
5ebe240d6bAdd Acknowledgements
Pim van Pelt
2017-11-28 00:51:22 +01:00
062e8144b3First README.md
Pim van Pelt
2017-11-28 00:45:58 +01:00
b96d06bf1bAdd AP2 license
Pim van Pelt
2017-11-27 23:51:29 +01:00
f87fec5ed0Add battery calibration values
Pim van Pelt
2017-11-27 23:14:17 +01:00
72f757a913Add prometheus hook for battery voltage
Pim van Pelt
2017-11-27 22:59:26 +01:00
4aa8c56f40add widget_battery() which shows the LiPo state of charge
Pim van Pelt
2017-11-27 22:36:38 +01:00
d07a0e053cBacklight support. TOUCH events feed backlight_keepalive(); After a timeout, we fade the backlight to 0 using timers. When the backlight is not active, TOUCH events are not passed to widgets, but the backlight is re-enabled; Add some flags to mos.yml to drive timeout and PWM pin for the backlight on Featherwing
Pim van Pelt
2017-11-27 21:30:01 +01:00
5f10481fb7STMPE610: Detect TOUCH_DOWN w/o TOUCH_UP, which happens with very short touch durations. If detected, resend the TOUCH_UP event
Pim van Pelt
2017-11-26 22:41:31 +01:00
ed9906a0bfMove to RoundRect() -- draw RED on TOUCH_DOWN, GREEN on TOUCH_UP
Pim van Pelt
2017-11-26 22:23:35 +01:00
2e0d122f2eAdd third button
Pim van Pelt
2017-11-26 22:23:13 +01:00
ed98d2de7cTrigger draw on TOUCH_UP
Pim van Pelt
2017-11-26 22:13:49 +01:00
4cbd34ddffAdd flowers.png
Pim van Pelt
2017-11-26 22:13:28 +01:00
80acd6ec7bMove image_png() to send_data; implement clipping to dispWin
Pim van Pelt
2017-11-26 21:47:09 +01:00
25cad76432Move to PNG imagery
Pim van Pelt
2017-11-26 21:04:58 +01:00
13f6ed14f1Remove JPG and BMP support. Add uPNG support.
Pim van Pelt
2017-11-26 21:03:48 +01:00
d5e01dedd2Simplify screen: make it absolute and fill the whole TFT
Pim van Pelt
2017-11-26 20:07:26 +01:00
43fad07afeMake JPG relative to dispWin
Pim van Pelt
2017-11-26 20:06:47 +01:00
3cb5fc18e7add widget_ev_to_str(); Pass 'ed' through to EV_WIDGET_TOUCH_{UP,DOWN} calls
Pim van Pelt
2017-11-26 19:27:57 +01:00
e826324244Plumb default_widget_handler and default_user_data for widgets read from JSON/File
Pim van Pelt
2017-11-26 19:06:44 +01:00
fda8b332dbAdd 'type', 'label', rename 'icon' to 'img' in widget
Pim van Pelt
2017-11-26 18:41:17 +01:00
a11336703eunit test 'img' and 'label' fields in widget
Pim van Pelt
2017-11-26 18:38:59 +01:00
c6f5fc3b8fFix use-after-free bug
Pim van Pelt
2017-11-26 18:06:17 +01:00
fb7e2a650dAllow screen to be seen by other files (needed by widget_name.c)
Pim van Pelt
2017-11-26 17:32:29 +01:00
5f07481d22Do not destroy on TIMER/TOUCH_{UP,DOWN}
Pim van Pelt
2017-11-26 17:32:00 +01:00
82c9999138Add WIDGET_NAME_SCREEN; Fix null deref in WIDGET_NAME_SSID
Pim van Pelt
2017-11-26 17:31:24 +01:00
ddb026217aAvoid calling widgets without handlers
Pim van Pelt
2017-11-26 17:14:11 +01:00
58fe68c6e3Reformat test_screen() output to show what we're doing
Pim van Pelt
2017-11-26 16:57:45 +01:00
e027c4d65bFix typo
Pim van Pelt
2017-11-26 16:52:31 +01:00
6c4c1b3d95Unit test for widget_set_timer()
Pim van Pelt
2017-11-26 16:51:59 +01:00
63f1088e7aCall EV_WIDGET_CREATE upon first installing of set_handler()
Pim van Pelt
2017-11-26 16:25:05 +01:00
64af496314Factor out widget_set_{handler,timer}() from app
Pim van Pelt
2017-11-26 16:10:51 +01:00
83b0d346aeAdd unit tests that catch invalid 'screen' and 'widget' JSON data.
Pim van Pelt
2017-11-26 16:01:08 +01:00
f9c4520b60Add widget_{set,delete}_{handler,timer}()
Pim van Pelt
2017-11-26 15:55:15 +01:00
fd68b1ec03Refactor app to use 'screen with widgets' rather than 'widgets'
Pim van Pelt
2017-11-26 15:01:59 +01:00
3e2e9d4e5bAdd screen.[ch] and unit tests
Pim van Pelt
2017-11-26 14:18:43 +01:00
79bb900deffactor out application widgets from widget.h -- add new include/mongoose-touch.h instead
Pim van Pelt
2017-11-26 11:32:47 +01:00
6985b30dc2Add a simple unit test for widget_add_from_file()
Pim van Pelt
2017-11-26 11:28:09 +01:00
b005dd8a26Add in standard MGOS libraries
Pim van Pelt
2017-11-26 10:59:42 +01:00
caed302f2fRefactor makefile to include SRCS
Pim van Pelt
2017-11-26 10:57:49 +01:00
a42ba88db7Fix 'make clean' to clean up frozen/frozen.o
Pim van Pelt
2017-11-26 10:49:33 +01:00
e924a64950Move frozen to its own subdir
Pim van Pelt
2017-11-26 10:48:10 +01:00
a8282618a3Fix ll_str length
Pim van Pelt
2017-11-26 10:44:11 +01:00
705c65c6c9Mostly empty unit tests -- added mgos_mock to be able to run unit tests on x86_64
Pim van Pelt
2017-11-26 10:43:44 +01:00
efa9b1bf68Allow widget_network() to be destroyed -- avoid allowing widget_network_recv()/send() if it's destroyed
Pim van Pelt
2017-11-25 01:49:11 +01:00
3a8aeb5e0fAdd widget_remove()
Pim van Pelt
2017-11-25 01:48:23 +01:00
4f64ed554aInitial commit
Pim van Pelt
2017-11-25 01:14:04 +01:00
d109bf9572Initial commit
Pim van Pelt
2017-11-25 01:06:56 +01:00