|
@@ -90,7 +90,10 @@ void send_MegaTec_cmd(cmdMegaTecEnums_t command)
|
|
|
uint8_t req[10];
|
|
|
|
|
|
memset(req, 0, 10);
|
|
|
- sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam);
|
|
|
+ if(TimeParam < 10)
|
|
|
+ sprintf(req, "%s0%d\r", MegaTecCMD[command], TimeParam);
|
|
|
+ else
|
|
|
+ sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam);
|
|
|
ups_send_block(req, strlen(req));
|
|
|
}
|
|
|
else if(command == ups_shutdown){
|