Skip to content

Commit 08c699c

Browse files
committed
fixed merge since did not preperly save changes
1 parent 8878cc7 commit 08c699c

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

Power/src/main.cpp

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ float Bvoltages[2];
4343

4444
// updates thrusters' pwm signals from array
4545
void updateThrusters(const uint16_t microseconds[8]) {
46-
<<<<<<< PowerBoardRos
47-
thrusters[BACK_L].writeMicroseconds(microseconds[BACK_L]);
48-
thrusters[HEAVE_BACK_L].writeMicroseconds(microseconds[HEAVE_BACK_L]);
49-
thrusters[HEAVE_FRONT_L].writeMicroseconds(microseconds[HEAVE_FRONT_L]);
50-
thrusters[FRONT_L].writeMicroseconds(microseconds[FRONT_L]);
51-
thrusters[FRONT_R].writeMicroseconds(microseconds[FRONT_R]);
52-
thrusters[HEAVE_FRONT_R].writeMicroseconds(microseconds[HEAVE_FRONT_R]);
53-
thrusters[BACK_R].writeMicroseconds(microseconds[BACK_R]);
54-
thrusters[HEAVE_BACK_R].writeMicroseconds(microseconds[HEAVE_BACK_R]);
55-
=======
5646
thrusters[BACK_L].writeMicroseconds(microseconds[BACK_L]);
5747
thrusters[HEAVE_BACK_L].writeMicroseconds(microseconds[HEAVE_BACK_L]);
5848
thrusters[HEAVE_FRONT_L].writeMicroseconds(microseconds[HEAVE_FRONT_L]);
@@ -61,32 +51,15 @@ void updateThrusters(const uint16_t microseconds[8]) {
6151
thrusters[HEAVE_FRONT_R].writeMicroseconds(microseconds[HEAVE_FRONT_R]);
6252
thrusters[BACK_R].writeMicroseconds(microseconds[BACK_R]);
6353
thrusters[HEAVE_BACK_R].writeMicroseconds(microseconds[HEAVE_BACK_R]);
64-
>>>>>>> main
6554
}
6655

6756
// updates microseconds array with values from ros
6857
void commandCb(const auv_msgs::ThrusterMicroseconds &tc) {
69-
<<<<<<< PowerBoardRos
70-
memcpy(microseconds, tc.microseconds, 8 * sizeof(uint16_t));
71-
=======
7258
memcpy(microseconds, tc.microseconds, 8 * sizeof(uint16_t));
73-
>>>>>>> main
7459
}
7560

7661
// attaches and arms thrusters
7762
void initThrusters() {
78-
<<<<<<< PowerBoardRos
79-
thrusters[BACK_L].attach(BACK_L_PIN);
80-
thrusters[HEAVE_BACK_L].attach(HEAVE_BACK_L_PIN);
81-
thrusters[HEAVE_FRONT_L].attach(HEAVE_FRONT_L_PIN);
82-
thrusters[FRONT_L].attach(FRONT_L_PIN);
83-
thrusters[FRONT_R].attach(FRONT_R_PIN);
84-
thrusters[HEAVE_FRONT_R].attach(HEAVE_FRONT_R_PIN);
85-
thrusters[HEAVE_BACK_R].attach(HEAVE_BACK_R_PIN);
86-
thrusters[BACK_R].attach(BACK_R_PIN);
87-
88-
updateThrusters(offCommand);
89-
=======
9063
thrusters[BACK_L].attach(BACK_L_PIN);
9164
thrusters[HEAVE_BACK_L].attach(HEAVE_BACK_L_PIN);
9265
thrusters[HEAVE_FRONT_L].attach(HEAVE_FRONT_L_PIN);
@@ -97,7 +70,6 @@ void initThrusters() {
9770
thrusters[BACK_R].attach(BACK_R_PIN);
9871

9972
updateThrusters(offCommand);
100-
>>>>>>> main
10173
}
10274

10375
// sets up ros publisher and subscriber nodes
@@ -114,7 +86,6 @@ void senseVoltage(float Bvoltages[]) {
11486

11587
// updates values sensed onto the ros nodes and publishes them
11688
void publishVoltages() {
117-
<<<<<<< PowerBoardRos
11889
senseVoltage(Bvoltages);
11990

12091
batt1_voltage_msg.data = Bvoltages[0];
@@ -134,44 +105,14 @@ void setup() {
134105
nh.subscribe(sub);
135106
nh.advertise(batt1_voltage);
136107
nh.advertise(batt2_voltage);
137-
=======
138-
senseVoltage(Bvoltages);
139-
140-
batt1_voltage_msg.data = Bvoltages[0];
141-
batt2_voltage_msg.data = Bvoltages[1];
142-
143-
batt1_voltage.publish(&batt1_voltage_msg);
144-
batt2_voltage.publish(&batt2_voltage_msg);
145-
}
146-
147-
void setup() {
148-
initThrusters();
149-
150-
pinMode(VBAT1_SENSE, INPUT);
151-
pinMode(VBAT2_SENSE, INPUT);
152-
153-
nh.initNode();
154-
nh.subscribe(sub);
155-
nh.advertise(batt1_voltage);
156-
nh.advertise(batt2_voltage);
157-
>>>>>>> main
158108
}
159109

160110
void loop() {
161111
updateThrusters(microseconds);
162112

163-
<<<<<<< PowerBoardRos
164113
publishVoltages();
165114

166115
nh.spinOnce();
167116

168117
delay(10);
169118
}
170-
=======
171-
publishVoltages();
172-
173-
nh.spinOnce();
174-
175-
delay(10);
176-
}
177-
>>>>>>> main

0 commit comments

Comments
 (0)