64 Commits (8892693344e8c34cb498129ee31ee5159ebbbd0e)
 

Author SHA1 Message Date
Marc Poulhiès 8892693344 Better handling of EPD refresh during configuration
Use a dirty flag to only update EPD when something has changed.
Makes the rotary use more friendly. Still not perfect as we miss all event
during a refresh... The less refresh, the less lost events...
2 years ago
Marc Poulhiès e3ffa02148 Minor code cleanup
Remove old/unused commented code
2 years ago
Marc Poulhiès 6eba9ef0c9 Bump cortex-m version 2 years ago
Marc Poulhiès 5b35e1da8c Make config more usable
Make config loop frequency higher (2s -> 100ms).
Use simple dirty bool to skip refresh when nothing has changed. Currently
handles both epd and leds, but should be split. LEDs are a bit longer to refresh
and can overflow the queue (1-sized).
2 years ago
Marc Poulhiès b27377c89c pcb: Fix typo in label name
Armless typo in pin name for EPD SPI clock.
2 years ago
Marc Poulhiès 0e2f08f937 WIP doc 2 years ago
Marc Poulhiès 27e2466c8a Add more config in github actions
Build more configs.
2 years ago
Marc Poulhiès 482f96c44a Change footprint for bme680 and rtc
Do not use ISC connector and solder module directly on PCB.
2 years ago
Marc Poulhiès 8867ae5b0c Fix range checking, lower brightness by default
Range checking was incorrect for range crossing day.
2 years ago
Marc Poulhiès daaaa94e8b New version of PCB
Routing done on larger area.
2 years ago
Marc Poulhiès fb3d554044 Handle brightness and allow for change in config mode
Config now cycles between hour, minute and brightness.
Leds data now wrapped in a struct with everything needed inside.

Re-enable partial refresh by setting the refresh count to 200 until a full
refresh must be done.
2 years ago
Marc Poulhiès d9d8287480 Bug fix for range checking during init
range that cross a day need special care.
Also fix wiring comment and import after change for rotary switch pin.
2 years ago
Marc Poulhiès fecf9a654d More modular app
Nearly possible to enable/disable epd,bme and rtc parts.
gpiod ISR still need to be commented, so not only via cargo features.

Rewired rotary switch from PB7 to PC4 as it's shorting the board. Most probably
the pin can't be used like this on the stellaris board (should better check).
2 years ago
Marc Poulhiès ce8cc92d7d Refactor and clean
Reorder task in priority order for easier read.
refresh_time does not always refresh the EPD, avoiding some priority problem
that led to uncorrect behavior.
2 years ago
Marc Poulhiès e77c53e7e3 Drop support for bme680 crate
Only support the drogue one as it seems to work better.
2 years ago
Marc Poulhiès dea4d2cc61 Switch to RTIC master
Until next release or something breaks.
2 years ago
Marc Poulhiès 9ad839fb87 Migrate to RTIC 0.6 (alpha)
Refactor for RTIC 0.6.
Change tasks priorities as this is most certainly the underlying problem.
Party drop support for bme680 crate, only use drogue's crate now.
2 years ago
Marc Poulhiès 755114a396 Changed overall state change monitoring
Rotary encoder+switch are not monitor when state is not Configuration(_).
When entering configuration mode, start a polling task for both rotary encoder
and switch (no more interrupt here).

Toggle switch is still monitored using interrupt: a debounce task is started
when an IT is raised and the task is not already running/queued.
2 years ago
Marc Poulhiès 685d7eaaa4 Forcing Full refresh until EPD strange behavior fixed
Using Full refresh does not make the incorrect behavior go away, but it makes
the device still usable. Not a fix nor a workaround.
2 years ago
Marc Poulhiès 492c59dd39 Change EPD busy pin from PB0 et PC6
Strange behavior observed on EPD, changing pin to avoid problems with using a
GPIO port also used with interrupt. Should not change anything... and it does
not change anything.
2 years ago
Marc Poulhiès 2980f34785 Use upstream rotary-encoder crate 2 years ago
Marc Poulhiès df0a84954c Add one more config for GH action 2 years ago
Marc Poulhiès 361ef6e240 Workaround bme680 problem
The sensors becomes unresponsive after some time (can be quick, can be very
long) until a reset is done. Using a soft reset seems to be working, but most
likely there's something incorrect elsewhere.
2 years ago
Marc Poulhiès 6d61abc637 Use smooth LEDs transitions 2 years ago
Marc Poulhiès 77c2c51ebc Minor cosmetic and cleanups
Reindent, use fewer LEDs during testing, fix wiring comments, fix range checking
during init.
2 years ago
Marc Poulhiès 31bdc38c89 Use NaiveTime during configuration. 2 years ago
Marc Poulhiès 9f202a4b24 Simple board.
Not yet tested, first version.
2 years ago
Marc Poulhiès d6ccd86168 Cross compile various config 2 years ago
Marc Poulhiès c8e40eb0b7 Fix tm4c123x dep 2 years ago
Marc Poulhiès f8963da904 Use embedded-various-fonts from git 2 years ago
Marc Poulhiès cc814517dd First shot at making conditional compilation for bme680
'usedrogue' cargo feature can be used to use drogue-bme680 instead of bme680.
Currently, works better as it reports a temperature value.
2 years ago
Marc Poulhiès e460a3e629 Rework partial refresh
split screen and display resources. Have epd and bme share the same prio level
as we don't want any loop delay to be interrupted.
2 years ago
Marc Poulhiès a1b394a24e Partial refresh for screen 2 years ago
Marc Poulhiès 95abf4b504 Use partial refresh instead of full refresh
Still need to to a full refresh at least once a day.
2 years ago
Marc Poulhiès 1c5919e8e4 Better layout for time, count i2c error for bme680
Looks like my prototype has something wrong with bme680.
Sensor stops reponding sometimes and a full hw reset is needed.
Handle errors and count them (until a reset is done...)
2 years ago
Marc Poulhiès 78741b5b8b Use digital::v2 instead of obsolete digital::v1
... and add corresponding .unwrap()
2 years ago
Marc Poulhiès 7fd3fbd96d Refresh Cargo deps, fix a bunch of warnings. 2 years ago
Marc Poulhiès 89413207f3 Basic layout of all info on screen
Looks like there is no bigger font than 24x32, so I may need to draw custom
chars for numbers.
2 years ago
Marc Poulhiès 1229aa7c67 Support for bme680
Init and sensor read using I2C working.
2 years ago
Marc Poulhiès 10448b4d17 Only display time on EPD 2 years ago
Marc Poulhiès 2ee9387276 Add bme680 support. Only init for now 2 years ago
Marc Poulhiès d00f13624c Various WIP
Config can cycle hour/minute change by pressing rotary.
Going back from config to normal using toggle saves new time in RTC.
Leave out partial refresh of EPD for now.
2 years ago
Marc Poulhiès 0bb506f4cf Refactor some types, add rotary switch handler
Wrap data needed for debouncing a switch in Switch struct.
2 years ago
Marc Poulhiès 44e19a4ea7 Refactored the mode change and how leds are handled
Currently, Config mode will rotate the leds with the rotary encoder.
RTC IT should be made lower prio than config task.
2 years ago
Marc Poulhiès a89384193b Toggle button works to switch from config to normal mode
There is still an issue when starting with switch in config mode.
Mode change should be refactored.
2 years ago
Marc Poulhiès 6fba764579 Add a toggle switch in the mix !
But won't work as RTIC uses SYST for periodic task... and tm4c-hal also uses
SYST for implementing Delay, needed for EPD.

Does not build.
2 years ago
Marc Poulhiès 499cf81819 Use rotary encoder.
Currently only spawns a task.
2 years ago
Marc Poulhiès a68a66da41 Add rotary encoder + fmt 2 years ago
Marc Poulhiès 97bec3bec5 Still WIP. Can be flashed without problem
Clock is updated every minutes with a full e-ink refresh.
LEDs should be correctly set from Range info
+Some debug info displayed.
2 years ago
Marc Poulhiès 340a70f6d4 Use some cfg feature to enable/disable semihosting prints 2 years ago