diff --git a/src/primary-esp32/main.cpp b/src/primary-esp32/main.cpp index 21ec67b..98629f6 100644 --- a/src/primary-esp32/main.cpp +++ b/src/primary-esp32/main.cpp @@ -303,15 +303,15 @@ void loop() { // being driven with. [motor_current] is an estimated average current draw of the motor in amps (a float). // Floats are given with 2 digits after the decimal (dynamic before the decimal) - sprintf(msg_buffer, "%lu %d %.2f %.2f %.2f %.2f 0.00", now, motor_status.motor_1_control.enabled, + sprintf(msg_buffer, "%lu %d %.2f %.3f %.3f %.2f 0.00", now, motor_status.motor_1_control.enabled, motor_status.motor_1_control.desired_speed, motor_status.roller_1_speed, motor_status.roller_1_revs, motor_status.motor_1_duty); mqtt_client.publish("airseeder/status/roller1", msg_buffer, true); - sprintf(msg_buffer, "%lu %d %.2f %.2f %.2f %.2f 0.00", now, motor_status.motor_2_control.enabled, + sprintf(msg_buffer, "%lu %d %.2f %.3f %.3f %.2f 0.00", now, motor_status.motor_2_control.enabled, motor_status.motor_2_control.desired_speed, motor_status.roller_2_speed, motor_status.roller_2_revs, motor_status.motor_2_duty); mqtt_client.publish("airseeder/status/roller2", msg_buffer, true); - sprintf(msg_buffer, "%lu %d %.2f %.2f %.2f %.2f 0.00", now, motor_status.motor_3_control.enabled, + sprintf(msg_buffer, "%lu %d %.2f %.3f %.3f %.2f 0.00", now, motor_status.motor_3_control.enabled, motor_status.motor_3_control.desired_speed, motor_status.roller_3_speed, motor_status.roller_3_revs, motor_status.motor_3_duty); mqtt_client.publish("airseeder/status/roller3", msg_buffer, true);