add flash storage

This commit is contained in:
Edward Emelianov
2026-07-29 21:01:01 +03:00
parent 2b4a9cbd84
commit 940b60df99
15 changed files with 352 additions and 70 deletions

View File

@@ -18,6 +18,7 @@
#include <stdint.h>
#include "flash.h"
#include "hardware.h"
#include "servo.h"
@@ -45,7 +46,7 @@ void process_servo(){
// set speed in steps per tick
bool servo_set_speed(uint8_t N, uint16_t s){
if(N >= SERVO_AMOUNT) return false;
if(s < 1 || s > SG90_MAXSPEED) return false;
if(s < 1 || s > the_conf.maxspeed[N]) return false;
servo_speed[N] = s;
return true;
}
@@ -58,7 +59,7 @@ bool servo_get_speed(uint8_t N, uint16_t *s){
bool servo_set_tagpos(uint8_t N, uint16_t pos){
if(N >= SERVO_AMOUNT) return false;
if(pos < SG90_MINPULSE || pos > SG90_MAXPULSE) return false;
if(pos < the_conf.minpulse[N] || pos > the_conf.maxpulse[N]) return false;
servo_tagpos[N] = pos;
return true;
}