Add MAX11609 voltage monitoring support to RTM Lamp#228
Merged
joao-victor-s merged 1 commit intomasterfrom Apr 23, 2025
Merged
Conversation
augustofg
requested changes
Apr 23, 2025
port/board/rtm-lamp/sdr_list.c
Outdated
Comment on lines
+646
to
+656
| .nominal_reading = (12000 >> 6), /* Nominal reading [(M * x + B * 10^(B_exp)) * 10^(R_exp)] = 12.032 V */ | ||
| .normal_max = (13000 >> 6), /* Normal maximum = 12.544 V */ | ||
| .normal_min = (11000 >> 6), /* Normal minimum = 11.456 V */ | ||
| .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ | ||
| .sensor_min_reading = 0x00, /* Sensor Minimum reading */ | ||
| .upper_nonrecover_thr = (16000 >> 6), /* Upper non-recoverable Threshold = 13.056 V */ | ||
| .upper_critical_thr = (15000 >> 6), /* Upper critical Threshold = 12.608 V */ | ||
| .upper_noncritical_thr = (14000 >> 6), /* Upper non critical Threshold = 12.48 V */ | ||
| .lower_nonrecover_thr = (8000 >> 6), /* Lower non-recoverable Threshold = 11.008 V */ | ||
| .lower_critical_thr = (9000 >> 6), /* Lower critical Threshold = 11.392 V */ | ||
| .lower_noncritical_thr = (10000 >> 6), /* Lower non-critical Threshold = 11.52 V */ |
Member
There was a problem hiding this comment.
Please update the comments to reflect the threshold values.
modules/task_priorities.h
Outdated
| #define tskMAX6642SENSOR_PRIORITY (tskIDLE_PRIORITY+3) | ||
| #define tskINA220SENSOR_PRIORITY (tskIDLE_PRIORITY+3) | ||
| #define tskINA3221SENSOR_PRIORITY (tskIDLE_PRIORITY+3) | ||
| #define tskMAX11609SENSOR_PRIORITY (tskIDLE_PRIORITY+3) |
Member
There was a problem hiding this comment.
Nit: remove extra space to maintain alignment.
modules/sensors/max11609.h
Outdated
Comment on lines
+24
to
+31
| /** | ||
| * @brief Monitoring task for LM75 sensor | ||
| * | ||
| * This task unblocks after every #LM75_UPDATE_RATE ms and updates the read from all the LM75 sensors listed in this module's SDR table | ||
| * | ||
| * @param Parameters Pointer to parameter list passed to task upon initialization (not used here) | ||
| */ | ||
| void vTaskMAX11609(); |
Member
There was a problem hiding this comment.
Update the comment here. Also, add a parameter void * param to the list of arguments (even if it is not used).
modules/sensors/max11609.h
Outdated
| /** | ||
| * @brief Rate at which the MAX11609 sensors are read (in ms) | ||
| */ | ||
| #define MAX11609_UPDATE_RATE 2000 |
Member
There was a problem hiding this comment.
Change this delay to 200 ms. Technically this is not an 'update rate' but an update period (this should be fixed in other sensor reading tasks in the future).
b57169b to
f5e9370
Compare
This commit adds voltage monitoring capability to the RTM Lamp by introducing the MODULE_MAX11609 module, which integrates with the max116xx driver. A new task, vTaskMAX11609, was created to iterate through the SDR table and measure sensor voltages for entries associated with the MAX11609. The task identifies relevant sensors by comparing their task_handle to its own and updates their readout_value field accordingly.
f5e9370 to
09df718
Compare
augustofg
approved these changes
Apr 23, 2025
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.
This commit adds voltage monitoring capability to the RTM Lamp by introducing the MODULE_MAX11609 module, which integrates with the max116xx driver.
A new task, vTaskMAX11609, was created to iterate through the SDR table and measure sensor voltages for entries associated with the MAX11609. The task identifies relevant sensors by comparing their task_handle to its own and updates their readout_value field accordingly.