min speed fix

This commit is contained in:
2024-10-03 20:20:52 +03:00
parent c7876a00c5
commit 251da124f7
3 changed files with 46 additions and 38 deletions

View File

@ -422,10 +422,13 @@ void UART3_GetStartupDelay(uint8_t *dataPtr, uint8_t len) {
// 210 !!!!!!!!
void UART3_SetMinRollerSpeed(uint8_t *dataPtr, uint8_t len) {
const uint8_t MIN_PARAM_LENGTH = 0;
const uint8_t MIN_PARAM_LENGTH = 1;
if (!checkLen(dataPtr[0], len, MIN_PARAM_LENGTH))
return;
infoBlock.hwInfo.motors.speed_Rollers_min = dataPtr[1];
saveInfoBlock();
SendResponse(dataPtr[0], 0, NULL, 0);
}
@ -435,8 +438,7 @@ void UART3_GetMinRollerSpeed(uint8_t *dataPtr, uint8_t len) {
if (!checkLen(dataPtr[0], len, MIN_PARAM_LENGTH))
return;
uint8_t res[1];
// res[0] = ;
uint8_t res[1] = {infoBlock.hwInfo.motors.speed_Rollers_min};
SendResponse(dataPtr[0], 0, res, sizeof(res));
}