mirror of https://github.com/arendst/Tasmota.git
correcting memcpy calls
This commit is contained in:
parent
47629a9d61
commit
df4f305e3a
|
@ -115,12 +115,12 @@ size_t MhzSendCmd(byte command_id)
|
|||
|
||||
mhz_send[0] = 0xFF; // Start byte, fixed
|
||||
mhz_send[1] = 0x01; // Sensor number, 0x01 by default
|
||||
memcpy_P(&mhz_send[2], kMhzCommands[command_id], sizeof(kMhzCommands[2]));
|
||||
memcpy_P(&mhz_send[2], kMhzCommands[command_id], sizeof(uint16_t));
|
||||
/*
|
||||
mhz_send[4] = 0x00;
|
||||
mhz_send[5] = 0x00;
|
||||
*/
|
||||
memcpy_P(&mhz_send[6], kMhzCommands[command_id] + sizeof(kMhzCommands[2]), sizeof(kMhzCommands[2]));
|
||||
memcpy_P(&mhz_send[6], kMhzCommands[command_id] + sizeof(uint16_t), sizeof(uint16_t));
|
||||
mhz_send[8] = MhzCalculateChecksum(mhz_send);
|
||||
|
||||
snprintf_P(log_data, sizeof(log_data), PSTR("Final MhzCommand: %x %x %x %x %x %x %x %x %x"),mhz_send[0],mhz_send[1],mhz_send[2],mhz_send[3],mhz_send[4],mhz_send[5],mhz_send[6],mhz_send[7],mhz_send[8]);
|
||||
|
|
Loading…
Reference in New Issue