mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
parent
e68f93b4e8
commit
ea226228f5
@ -1245,7 +1245,12 @@ void CmndShutterPosition(void)
|
|||||||
ShutterReportPosition(true, index);
|
ShutterReportPosition(true, index);
|
||||||
}
|
}
|
||||||
XdrvMailbox.index = index +1; // Fix random index for ShutterClose
|
XdrvMailbox.index = index +1; // Fix random index for ShutterClose
|
||||||
strcpy( XdrvMailbox.command , D_CMND_SHUTTER_POSITION);
|
|
||||||
|
// As this function is called three times from outside the command handler
|
||||||
|
// XdrvMailbox.command may not point to a char string resulting in exception 29 on strcpy
|
||||||
|
char command[CMDSZ] = { 0 };
|
||||||
|
XdrvMailbox.command = command;
|
||||||
|
strcpy(XdrvMailbox.command, D_CMND_SHUTTER_POSITION);
|
||||||
ResponseCmndIdxNumber((Settings->shutter_options[index] & 1) ? 100 - target_pos_percent : target_pos_percent);
|
ResponseCmndIdxNumber((Settings->shutter_options[index] & 1) ? 100 - target_pos_percent : target_pos_percent);
|
||||||
} else {
|
} else {
|
||||||
ShutterReportPosition(true, MAX_SHUTTERS);
|
ShutterReportPosition(true, MAX_SHUTTERS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user