Skip to content

Commit

Permalink
Fixed small warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidGeek committed May 20, 2022
1 parent f80ffbf commit 750626f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/VescUart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ int VescUart::packSendPayload(uint8_t * payload, int lenPay) {
messageSend[count++] = (uint8_t)(lenPay & 0xFF);
}

memcpy(&messageSend[count], payload, lenPay);

memcpy(messageSend + count, payload, lenPay);
count += lenPay;

messageSend[count++] = (uint8_t)(crcPayload >> 8);
messageSend[count++] = (uint8_t)(crcPayload & 0xFF);
messageSend[count++] = 3;
messageSend[count] = '\0';
// messageSend[count] = NULL;

if(debugPort!=NULL){
debugPort->print("Package to send: "); serialPrint(messageSend, count);
Expand Down Expand Up @@ -217,9 +217,9 @@ bool VescUart::processReadPacket(uint8_t * message) {

break;

case COMM_GET_VALUES_SELECTIVE:
/* case COMM_GET_VALUES_SELECTIVE:
uint32_t mask = 0xFFFFFFFF;
uint32_t mask = 0xFFFFFFFF; */

default:
return false;
Expand Down Expand Up @@ -390,7 +390,7 @@ void VescUart::setDuty(float duty, uint8_t canId) {
payload[index++] = { COMM_SET_DUTY };
buffer_append_int32(payload, (int32_t)(duty * 100000), &index);

packSendPayload(payload, 5);
packSendPayload(payload, payloadSize);
}

void VescUart::sendKeepalive(void) {
Expand Down

0 comments on commit 750626f

Please sign in to comment.