Fixing bug in servo

main
YohanHadji 2022-04-08 15:03:16 +02:00
rodzic 5ff4910874
commit aff1205bd6
4 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -7,7 +7,6 @@
#include "debug.hpp" #include "debug.hpp"
#include "navigation.hpp" #include "navigation.hpp"
#include "rc.hpp" #include "rc.hpp"
#include "servo.hpp"
#define LED_PIN 3 #define LED_PIN 3
#define LED_COUNT 1 #define LED_COUNT 1

Wyświetl plik

@ -36,6 +36,8 @@ void setup() {
barometer_setup(); barometer_setup();
navigation_setup(); navigation_setup();
cmpt_weight_gain();
buzzer_end_setup(); buzzer_end_setup();
} }
@ -68,6 +70,8 @@ void getdata() {
} }
void datacmpt() { void datacmpt() {
cmpt_pressure_gain(pressure_baro);
if (new_cog) { if (new_cog) {
new_cog = false; new_cog = false;
@ -79,7 +83,7 @@ void datacmpt() {
if (I_WANT_TO_FLY) { if (I_WANT_TO_FLY) {
cmd_to_waypoint = sim(); cmd_to_waypoint = sim();
Serial.println(cmd_to_waypoint); //Serial.println(cmd_to_waypoint);
cog_ok = true; cog_ok = true;
} }

Wyświetl plik

@ -1,6 +1,6 @@
#include "config.h" #include "config.h"
#include "position.hpp" #include "position.hpp"
#include "control.hpp" #include "servo.hpp"
struct gps_location { struct gps_location {
double latitude = 0; double latitude = 0;

Wyświetl plik

@ -1,4 +1,5 @@
#include "config.h" #include "config.h"
#include "control.hpp"
#include <PWMServo.h> #include <PWMServo.h>
PWMServo steer; PWMServo steer;