Finish numberstack code UI

This commit is contained in:
maddiebaka
2026-04-25 15:41:45 -04:00
parent 0a56a1ec1c
commit 160ee1ce2f
3 changed files with 113 additions and 37 deletions
+6 -6
View File
@@ -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();