- implemented linear approximation for pwm duty cycle offset (feed forward)
- changed pid params and variables in measure() from float to integers - implemented Motor PWM Frequency CV - improved acknowledge() function ( 3ms forward / 3ms reverse ) - moved automatic offset setup to speed step evaluation - removed zener diode correction - some minor changes regarding naming of constants
This commit is contained in:
1 parent
cdb68b84da
commit
2cad01370c
6 files changed
+146
-151
No files matched your search
@@ -14,9 +14,10 @@
|
||||
#include "hardware/adc.h"
|
||||
#include "hardware/flash.h"
|
||||
#include "hardware/irq.h"
|
||||
#define ADC_OFFSET 0.025f
|
||||
#define MOTOR_PWM_FORWARD 22
|
||||
#define MOTOR_PWM_REVERSE 23
|
||||
#define _125M 125000000
|
||||
#define ADC_OFFSET 13
|
||||
#define MOTOR_FWD_PIN 22
|
||||
#define MOTOR_REV_PIN 23
|
||||
#define FLASH_TARGET_OFFSET (PICO_FLASH_SIZE_BYTES-FLASH_SECTOR_SIZE) //This Offset should be far enough away from program data
|
||||
extern repeating_timer_t pid_control_timer;
|
||||
extern repeating_timer_t speed_helper_timer;
|
||||
@@ -24,4 +25,4 @@ extern bool target_direction;
|
||||
extern uint target_speed_step;
|
||||
extern const uint8_t *CV_ARRAY_FLASH;
|
||||
void core1_entry();
|
||||
float measure(bool direction);
|
||||
uint32_t measure(bool direction);
|
||||
Reference in new issue
Block a user