-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple fixes and improvements #380
Conversation
This was causing a crash in the simulator when setting the location. Fixes: joeycastillo#198
the sleep mode doesn't get set immediately, and needs to be waited upon.
* Introduce shell module for basic serial shell with argument parsing * Introduce shell_cmd_list module for basic compile-time command registration * Harden USB handling to hang less and drop fewer inputs - Service tud_task() with periodic TC0 timer interrupt - Service cdc_task() with periodic TC1 timer interrupt - Handle shell servicing in main app loop - Add a circular buffering layer for reads/writes * Change newline prints to also send carriage return * Refactor filesystem commands for shell subsystem * Introduce new shell commands: - 'help' command - 'flash' command to reset into bootloader - 'stress' command to stress CDC writes Testing: * Shell validated on Sensor Watch Blue w/ Linux host * Shell validated in emscripten emulator * Tuned by spamming inputs during `stress` cmd until stack didn't crash
Aggregates all the data necessary for TOTP generation.
Generates a compound initializer for the given TOTP parameters. Lessens repetition and allows functional definitions of TOTP records.
The data definitions are much shorter and easier to read now.
Computes the size of the array of TOTP records. The compiler will likely evaluate it at compile time.
Selects the appropriate TOTP data structure given the TOTP watch face state.
Using the new structured TOTP record data structure allows the TOTP watch face to statically and implicitly compute the total number of defined TOTP records. Users can now simply add new keys and records in the designated area and the watch face will compile and automatically use them with no need to maintain a separate array size variable. Less chance of mistakes.
The TOTP watch face now keeps track of each key separately. There is no need to compute offsets at runtime.
Update the copyrights to include full name attribution to all who contributed to this watch face, including myself. Also add an SPDX license identifier header comment to the files. https://spdx.org/licenses/MIT.html
Implements an advanced pulsometer that can be recalibrated by the user. The main clock face now displays the measured pulses per minute. The day of month digits now display the pulsometer calibration. The light button now cycles through integer graduations which now range from 1 to 39 pulses per minute. Long presses of the light button cycle by 10 instead of 1. The watch face's responsiveness to input has been carefully optimized. The code has been reorganized and generally improved.
Thoroughly document the new advanced pulsometer watch face by describing what it is and how it works.
Update the copyrights to include full name attribution to all who contributed to the pulsometer watch face, including myself. Also add an SPDX license identifier header comment to the files.
Instances of the pulsometer state structure are only passed to the pulsometer itself and only via the opaque context pointer. No other code uses it. There is no need to expose it in a header file so make it an implementation detail of the watch face.
It's not actually so simple and will only gain features from now on. Just "clock face" also feels more canonical.
Instances of the clock state structure are only passed to the clock face itself and only via the opaque context pointer. No other code uses it. Thus there is no need to expose it in a header file. So make it an implementation detail of the watch face by localizing it inside the translation unit.
Sets or clears the specified indicator based on some boolean value.
Fixes a crash due to use of uninitialized buffer when setting location. Reported-by: eshrh <[email protected]> Fixed-by: Wesley Aptekar-Cassels <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#329 GitHub-Issue: joeycastillo#198 Fixes: joeycastillo#198
Implements the recommended workarounds for numerous silicon errata, reducing power consumption and preventing freezes and hard faults. Tested-by: Alex Maestas <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Alex Maestas <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Reviewed-by: Wesley Aptekar-Cassels <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#340 GitHub-Related-Issue: joeycastillo#361 GitHub-Related-Issue: joeycastillo#359 Reference: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/Errata/SAM-L22-Family-Silicon-Errata-and-Data-Sheet-Clarification-DS80000782.pdf
- Change newline prints to also send carriage return - Introduce shell module for serial shell with argument parsing - Introduce shell command list for compile time command registration - Refactor file system commands for shell subsystem - Introduce new shell commands: - 'help' command - 'flash' command to reset into bootloader - 'stress' tests CDC serial writes of various lengths - optional delay parameter - Harden USB handling - Hangs less - Drops fewer inputs - Circular buffers for both reads and writes Reported-by: Edward Shin <[email protected]> Tested-by: Edward Shin <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Reviewed-by: James Haggerty <[email protected]> Reviewed-by: Wesley Aptekar-Cassels <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#344
Adds overridable C preprocessor definitions for every user preference. Enables the user to set defaults and omit the preferences face. The default behavior of the watch is preserved. Suggested-by: Wesley Aptekar-Cassels <[email protected]> Implemented-by: madhogs <[email protected]> Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#295 GitHub-Related-Issue: joeycastillo#291
Makes a long press of the ALARM button reset the face to current day. Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> Tested-by: Wesley Aptekar-Cassels <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#316
Completely refactors the simple clock face and lays the foundations for new features. Also adds a compile time 24 hour mode only feature. Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#373
Implements an advanced pulsometer that can be calibrated by the user. Also features a streamlined and responsive user interface, new documentation and generally improved code. Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#371
Aggregates the TOTP credentials into a data structure, making it easier to define and use the credentials. Also incorporate backwards movement code from another branch. Co-authored-by: Max Zettlmeißl <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#369 GitHub-Related-Pull-Request: joeycastillo#356
Currently, movement drops timeout events in case the previous loop indicates that sleep is not possible. This is due to unintended short circuiting behavior of && and is fixed with a temporary variable. The static qualifier of can_sleep is also removed. Helped-by: Alex Maestas <[email protected]> Tested-by: Matheus Afonso Martins Moreira <[email protected]> Tested-on-hardware-by: Matheus Afonso Martins Moreira <[email protected]> Signed-off-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: joeycastillo#376
Thanks for the thorough commenting and testing :) Once #373 is updated on this branch, we'll be happy to merge this. |
Something I forgot to mention about this branch: the clock face replaces the simple clock face in it. I thought it was alright since I've been running it for weeks now with no issues, and I also tested alarms and hourly chimes too. I can split it up again if needed though. |
@joeycastillo did request that the simple clock face remain in place, so i think restoring that will make this branch mergeable :) |
Yes. More thorough testing of the new clock face was required before it could replace the original, so I created this branch with the clock face replaced in order to flash it to my device for testing. Eventually I started merging all the other PRs as well and it turned into a Linux style Not sure how much testing is enough to be honest. Been running it every day for weeks now, tested every function and have found no issues. What do you think @joeycastillo? |
I'm on mobile at the moment and don't have access to a computer right now. When I get home I'll split the faces up in order to unblock this, assuming Joey hasn't changed his mind. |
the extensive testing and thorough annotation is quite appreciated, for sure. I think the goal behind having the simple clock face separate from the advanced one is that the simple face serves as a low-complexity example for others to build new faces from, but we'll have to defer to Joey on this. |
Yeah, I have this propensity to making small functions. I personally find it easier to understand but others found to be "Lisp-like", a quality which I didn't even try to refute due to my love of lisp. In my mind the refactored code is easier to understand, but I'll respect it if others don't find it so. |
Restore the original simple clock face as requested.
ddbe7a8
to
955ac94
Compare
@matheusmoreira, I checked simple clock face and "your" clock face in the online firmware builder. They act different in indicating alarm and hourly chime. Refering to #373 (comment) I thought they should be identically? |
Yes. It appears the hourly chime and alarm indicators had been swapped in movement. I noticed this and swapped them back. So |
Well, what I read about the original watch behavior is, that the bell indicates a hourly signal und the waves a alarm - it's the same for the simple_clock_face, but not in clock_face. But you are right, in the documentation (#373 (comment)) it's swapped and should be corrected. |
You're absolutely right about that. I based the decision to switch the icons on the watch library documentation. Turns out the documentation was swapped all along!! Sensor-Watch/watch-library/shared/watch/watch_slcd.h Lines 44 to 51 in 439843f
There's the So this should definitely be fixed. Perhaps the fix should happen inside movement at the API level. The constants |
I misinterpreted the documentation and swapped the alarm and time signal indicators in the clock face. This patch brings it back in sync with the original watch's behavior as described in the manual. Reported-by: 814d3 (GitHub) Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: #433 References: #380 References: #132
I misinterpreted the documentation and swapped the alarm and time signal indicators in the clock face. This patch brings it back in sync with the original watch's behavior as described in the manual. Reported-by: 814d3 (GitHub) Reviewed-by: Matheus Afonso Martins Moreira <[email protected]> GitHub-Pull-Request: #433 References: #380 References: #132
The following pull requests have been merged and tested on hardware:
The latest commits were fetched and merged, preserving authorship and date information. I also extensively credited all contributors in the merge commits.