Finish numberstack code UI
This commit is contained in:
@@ -29,7 +29,6 @@ extern "C" {
|
||||
#include "motor.h"
|
||||
}
|
||||
|
||||
|
||||
static const char *TAG = "spincoat-plater-firmware";
|
||||
|
||||
static double throttle = 0;
|
||||
@@ -52,20 +51,21 @@ extern "C" void app_main(void) {
|
||||
srand((unsigned int)esp_timer_get_time());
|
||||
|
||||
esc_telemetry_t telemetry;
|
||||
double target = 250;
|
||||
double target = 100;
|
||||
double real_rpm = 0;
|
||||
|
||||
AutoPID myPID(&real_rpm, &target, &throttle, OUTPUT_MIN, OUTPUT_MAX, KP, KI, KD);
|
||||
myPID.setTimeStep(100); // don't set too low or you'll blow the DC-DC converter
|
||||
myPID.setBangBang(400);
|
||||
myPID.setTimeStep(100);
|
||||
myPID.setBangBang(400); // if you mess with this, you may melt your circuit
|
||||
|
||||
init_display();
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
build_ui();
|
||||
|
||||
|
||||
init_motor();
|
||||
update_throttle(throttle);
|
||||
|
||||
|
||||
while(1) {
|
||||
send_dshot_packet();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user