|
|
|
|
@ -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 %.3f %.3f %.2f %.2f", now, motor_status.motor_1_control.enabled,
|
|
|
|
|
sprintf(msg_buffer, "%lu %d %.3f %.3f %.3f %.2f %.2f", 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, motor_status.motor_1_current);
|
|
|
|
|
mqtt_client.publish("airseeder/status/roller1", msg_buffer, true);
|
|
|
|
|
sprintf(msg_buffer, "%lu %d %.2f %.3f %.3f %.2f %.2f", now, motor_status.motor_2_control.enabled,
|
|
|
|
|
sprintf(msg_buffer, "%lu %d %.3f %.3f %.3f %.2f %.2f", 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, motor_status.motor_2_current);
|
|
|
|
|
mqtt_client.publish("airseeder/status/roller2", msg_buffer, true);
|
|
|
|
|
sprintf(msg_buffer, "%lu %d %.2f %.3f %.3f %.2f %.2f", now, motor_status.motor_3_control.enabled,
|
|
|
|
|
sprintf(msg_buffer, "%lu %d %.3f %.3f %.3f %.2f %.2f", 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, motor_status.motor_3_current);
|
|
|
|
|
mqtt_client.publish("airseeder/status/roller3", msg_buffer, true);
|
|
|
|
|
|