Add LVSolarBuck64 firmware and debug console with uv support
STM32G474RB firmware for solar buck converter with MPPT, CC control, Vfly compensation, and adaptive deadtime. Includes Textual TUI debug console for real-time telemetry, parameter tuning, and SQLite logging. Added pyproject.toml for uv: `cd code64 && uv run debug-console` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
code64/Core/Inc/cc_controller.h
Normal file
30
code64/Core/Inc/cc_controller.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* cc_controller.h
|
||||
*
|
||||
* Created on: Jun 11, 2025
|
||||
* Author: janik
|
||||
*/
|
||||
|
||||
#ifndef INC_CC_CONTROLLER_H_
|
||||
#define INC_CC_CONTROLLER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
typedef struct {
|
||||
float gain; // Step per unit error
|
||||
float min_step; // Minimum step size (in float)
|
||||
float max_step; // Maximum step size (in float)
|
||||
float output_f; // Internal float output
|
||||
uint16_t out_min; // DAC min
|
||||
uint16_t out_max; // DAC max
|
||||
} CCController;
|
||||
|
||||
void CC_Init(CCController *cc, float gain, float min_step, float max_step,
|
||||
uint16_t out_min, uint16_t out_max, float initial_output);
|
||||
|
||||
uint16_t CC_Update(CCController *cc, float target, float measurement);
|
||||
|
||||
|
||||
|
||||
#endif /* INC_CC_CONTROLLER_H_ */
|
||||
Reference in New Issue
Block a user