Fixed typo with strncpy.

This commit is contained in:
James Goppert 2013-06-29 16:00:27 -04:00
parent 76d086e077
commit 77c084a4cf
1 changed files with 2 additions and 2 deletions

View File

@ -604,13 +604,13 @@ int md25Sine(const char *deviceName, uint8_t bus, uint8_t address)
mavlink_log_info(mavlink_fd, "rpm: %10.4f\n", (double)output_speed_rpm);
// send input message
strncpy(debug_msg.key, "md25 in ", sizeof(10));
strncpy(debug_msg.key, "md25 in ", 10);
debug_msg.timestamp_ms = 1000*timestamp;
debug_msg.value = input_value;
debug_msg.update();
// send output message
strncpy(debug_msg.key, "md25 out ", sizeof(10));
strncpy(debug_msg.key, "md25 out ", 10);
debug_msg.timestamp_ms = 1000*timestamp;
debug_msg.value = output_speed_rpm;;
debug_msg.update();