File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ bool create_entities() {
72
72
return true ;
73
73
}
74
74
75
- void publishAndSubscribe () {
75
+ void computeAndPublish () {
76
76
power_board_temperature_msg.data = temperatureSensor.readTemperature ();
77
77
micro_ros.publishData (&power_board_temperature_msg, *power_board_temperature_publisher); // Dereference pointer
78
78
@@ -117,17 +117,18 @@ void power_setup() {
117
117
118
118
void power_loop () {
119
119
if (micro_ros.pingAgent ()) {
120
- publishAndSubscribe ();
120
+ computeAndPublish ();
121
121
micro_ros.spin ();
122
122
updateThrusters (microseconds);
123
123
124
124
} else {
125
125
updateThrusters (offCommand);
126
126
micro_ros.destroyMicroROS ();
127
127
128
- while (micro_ros.pingAgent ()) {
128
+ while (! micro_ros.pingAgent ()) {
129
129
130
130
}
131
+ delay (10 );
131
132
create_entities ();
132
133
}
133
134
You can’t perform that action at this time.
0 commit comments