feat: DAQ Heartbeat#546
Open
nicholasching wants to merge 61 commits into
Open
Conversation
* added positionfromV function and implemented in LV Controller * fixed unused variable and declaration * format issues * typo * fix formatting * maybe now its for-real * apply clang-format fixes * fixing suspension formatting * restore platformio file * changes on dbc file for suspension travel * updated namespace * updated test cases and edge case * naming and added comment * fix build issue
* Added configurations for tms to use FreeRTOS * Converted main.cc to use FreeRTOS tasks * Removed lib_deps from env in platformio file for tms * generated files from cubemx
* Add static code analysis to dashboard project * Add static code analysis to front_controller * Add static code analysis to lvcontroller * Add static code analysis to tms * Revert check_severity to default value * Add static code analysis to demo projects * Add pio check to build-test-projects * Add pio check to pre-commit
* added fc suspension on dbc * change class to sustravel12 * called in main.cc and fixed include statement * inserted in loop
* Check for changes only in certain directories * Fix static code analysis workflow * Fix build-test-projects.yml * Add test files for PR analysis * Remove test files from repo * Reduce number of pre-commit checks * Reduce number of PR analysis checks
* Added generate git hash script * Added platformio configs to use generate_git_hash.py as a new pre script file * Added sending of git hash in lvcontroller * Added 1hz task and git hash send to front controller * Added 1hz task and git hash send to tms * Used env variable for finding include directory of project
sokosam
reviewed
Dec 2, 2025
| can0Active := h.can0 != nil | ||
| can1Active := h.can1 != nil | ||
| return can0Active, can1Active | ||
| } |
Contributor
There was a problem hiding this comment.
I haven't touched go in a while but can you confirm if this actually checks if the can channels are active? (assuming that this is the goal)
are we certain that if HeartbeatHandler -> can0 : net.Conn is simply initialized that it would mean its active/online?
Again I'm not really sure how this works so just lmk if its right or not.
| logger.Error("Failed to send heartbeat", zap.Error(err)) | ||
| } | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Can we name both to Interval? Feels weird to have one be uploadTimer and heartbeatInterval
Suggested change
| } | |
| uploadInterval := time.NewTimer(time.Second) | |
| heartbeatInterval := time.NewTicker(3 * time.Second) | |
| defer heartbeatInterval.Stop() | |
| for { | |
| select { | |
| case <-uploadInterval.C: | |
| err = telemetry.Upload() | |
| if err != nil { | |
| fmt.Printf("failed to upload telemetry data: %v\n", err) | |
| } | |
| case <-heartbeatInterval.C: | |
| err = heartbeat.SendHeartbeat() | |
| if err != nil { | |
| logger.Error("Failed to send heartbeat", zap.Error(err)) | |
| } | |
| } | |
| } | |
Takes way to long. We should not be checking static analysis in precommit since it takes several minutes. This should only be a github check
PRs can now be approved by anyone in the organization.
* Clear out mcal sil. start sockets * Adding Cobs message framing.` * Send data with COBS * Fix flags in platformio * Fix Nanopb bug with PlatformIO See the comment in `platformio.ini` The bug is described in nanopb/nanopb#818 * Add pwm to protobuf --------- Co-authored-by: Blake Freer <bkfreer10@gmail.com>
* Add configurable pedal-to-torque mapping * Fix clang-format issues in tuning.hpp * Set default pedal map to linear
* Migrate dashboard to LVGL 9.3 and add StatusBar - Update LVGL dependency from 8.3 to 9.3 for both Linux and STM32 - Migrate display drivers to LVGL 9.3 API (lv_display_t, flush callbacks) - Regenerate FE_Logo with RGB565 format for LVGL 9.3 compatibility - Fix STM32 build: disable ARM Helium/NEON SIMD in lv_conf.h - Fix exception handling for embedded targets (STM32) - Add development tooling and documentation Tested: Both targets build successfully * Address review feedback: memory safety, config updates, and code cleanup * Removed logo splash page. Saved 100KB in Flash * Remove unused submodules :) * Fix LVGL config issues Dashboard wasn't showing anything: - enabled LTDC callback in cubemx - told platformio not to override the hal_conf with a build config option - enabled st ltdc in lvgl.h - enabled dma in ltdc Still to fix: fonts don't show up correctly * Fix the dashboard, cubemx overwrites stm32f4xx_it.c which is an issue and must be kept in mind * fix overwriting stm32f44x_it.c in cubemx and reset pin config * format * Finalize push * format & pin out config * repeat --------- Co-authored-by: Furqaan <furqaankhurram@gmail.com> Co-authored-by: Blake Freer <bkfreer10@gmail.com> Co-authored-by: ManushPatell <manush.patelll@gmail.com>
untested
Writes them to a local SQLite DB for now
Plus some other misc work
58cf1a3 to
9dddc41
Compare
…cecar into daq-nick-heartbeat
* clean branch, update lv pinout config * new bindings * fix hsd binding * read channels periph * hsd classes * hsd class implementation * add cli testing, and fix build issue * add bindings for stm32 * fix clang format * dashboard clang format * sil bindings, will need to improve after comp * update dcdc, and cli bindings * sil bindings, still throw errors * dcdc * add new dcdc can message in veh bus * add missing channel
* Update fc pinout * pinouts fc new rev * new hsd folder * add to alerts, new signal name for overcurrent * fixed include * fix hsd error * add veh can to hsd update * fix return * hsd * fix bindings * fix another build error * adding mcal bindings * adding mcal bindings * add thresholds, and mappign * . --------- Co-authored-by: ManushPatell <manush.patelll@gmail.com>
* bypass logo screen * fix logic
…cecar into daq-nick-heartbeat
…cecar into daq-nick-heartbeat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completed basic heartbeat functionality for DAQ with the following features and design considerations:
Decided to implement heartbeat on separate heartbeat.go file for modularization.
On an interval, currently 3s, send POST request to the server with the following info:
If communication fails, nothing happens; we will continue sending on the same regular interval.