Skip to content

Commit

Permalink
Bug fix - Fixed value parsing type in CmdUpdateRampTime and CmdUpdate…
Browse files Browse the repository at this point in the history
…PeakHoldTime
  • Loading branch information
dwight9339 committed Dec 30, 2024
1 parent 0ecfb03 commit 4c34b1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tasmota/tasmota_xdrv_driver/xdrv_100_aquarium.ino
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ void CmdUpdateRampShape(void) {
}

void CmdUpdateRampTime(void) {
uint8_t time;
if (sscanf(XdrvMailbox.data, "%hhu", &time) == 1) {
uint16_t time;
if (sscanf(XdrvMailbox.data, "%u", &time) == 1) {
if (time > 1440) {
ResponseCmndChar(PSTR("Maximum ramp time is 1440 minutes."));
} else {
Expand All @@ -100,8 +100,8 @@ void CmdUpdateRampTime(void) {
}

void CmdUpdatePeakHoldTime(void) {
uint8_t time;
if (sscanf(XdrvMailbox.data, "%hhu", &time) == 1) {
uint16_t time;
if (sscanf(XdrvMailbox.data, "%u", &time) == 1) {
if (time > 1440) {
ResponseCmndChar(PSTR("Maximum peak hold time is 1440 minutes."));
} else {
Expand Down

0 comments on commit 4c34b1d

Please sign in to comment.