Add doc and remove unused variables in main.cpp
This commit is contained in:
parent
b263f4b1b7
commit
a04d66c0ed
|
|
@ -84,7 +84,7 @@ def cartesian_to_angles(x, y, z):
|
||||||
alpha2 = theta2 * 180 / math.pi
|
alpha2 = theta2 * 180 / math.pi
|
||||||
alpha3 = theta3 * 180 / math.pi
|
alpha3 = theta3 * 180 / math.pi
|
||||||
log_serial(f"Angles: {alpha1:.2f}, {alpha2:.2f}, {alpha3:.2f}", "blue")
|
log_serial(f"Angles: {alpha1:.2f}, {alpha2:.2f}, {alpha3:.2f}", "blue")
|
||||||
return [alpha1, alpha2, alpha3]
|
return [alpha1, alpha2, alpha3] # in degree
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
print(f"Error in cartesian_to_angles: {e}")
|
print(f"Error in cartesian_to_angles: {e}")
|
||||||
raise e
|
raise e
|
||||||
|
|
|
||||||
12
src/main.cpp
12
src/main.cpp
|
|
@ -97,18 +97,6 @@ unsigned long lastUpdate = 0; // Last time the position was updated
|
||||||
const int updateInterval = 0; // Update interval in milliseconds
|
const int updateInterval = 0; // Update interval in milliseconds
|
||||||
int newTarget = 0;
|
int newTarget = 0;
|
||||||
|
|
||||||
int potValue1 = 0;
|
|
||||||
int potValue2 = 0;
|
|
||||||
int potValue3 = 0;
|
|
||||||
int potValue4 = 0;
|
|
||||||
int potValue5 = 0;
|
|
||||||
int potValue6 = 0;
|
|
||||||
int targetPosition1 = 0;
|
|
||||||
int targetPosition2 = 0;
|
|
||||||
int targetPosition3 = 0;
|
|
||||||
int targetPosition4 = 0;
|
|
||||||
int targetPosition5 = 0;
|
|
||||||
int targetPosition6 = 0;
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue