mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Cleanups and minor changes
This commit is contained in:
parent
c4ac5eb9d0
commit
8df71b078d
@ -56,13 +56,11 @@ void control()
|
||||
interpretRC();
|
||||
if (mode == STAB) {
|
||||
controlAttitude();
|
||||
// controlAttitudeAlter();
|
||||
}
|
||||
|
||||
if (mode == MANUAL) {
|
||||
controlManual();
|
||||
} else {
|
||||
controlRate();
|
||||
} else if (mode == ACRO) {
|
||||
controlRate();
|
||||
} else if (mode == MANUAL) {
|
||||
controlManual();
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,7 +75,7 @@ void interpretRC()
|
||||
mode = STAB;
|
||||
}
|
||||
|
||||
armed = controls[RC_CHANNEL_THROTTLE] >= 0.1 && controls[RC_CHANNEL_AUX] >= 0.5;
|
||||
armed = controls[RC_CHANNEL_THROTTLE] >= 0.05 && controls[RC_CHANNEL_AUX] >= 0.5;
|
||||
|
||||
controlYaw = armed && mode == STAB && controls[RC_CHANNEL_YAW] == 0;
|
||||
if (!controlYaw) {
|
||||
|
@ -43,8 +43,8 @@ void logData()
|
||||
|
||||
void dumpLog()
|
||||
{
|
||||
Serial.printf("timestamp,rate.x,rate.y,rate.z,target.rate.x,target.rate.y,target.rate.z,"
|
||||
"attitude.x,attitude.y,attitude.z,target.attitude.x,target.attitude.y,target.attitude.z,thrust\n");
|
||||
Serial.printf("t,rate.x,rate.y,rate.z,ratesTarget.x,ratesTarget.y,ratesTarget.z,"
|
||||
"attitude.x,attitude.y,attitude.z,attitudeTarget.x,attitudeTarget.y,attitudeTarget.z,thrustTarget\n");
|
||||
for (int i = 0; i < LOG_SIZE; i++) {
|
||||
for (int j = 0; j < LOG_COLUMNS - 1; j++) {
|
||||
Serial.printf("%f,", logBuffer[i][j]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user