Produces 99.8% accurate results of pwm open loop in lab testing. It is a 004002 and needs bench testing
This commit is contained in:
@@ -106,13 +106,15 @@ static int16_t fbkw_get_b_fb_kw(void *ctx) {
|
||||
static int16_t fbkw_get_state_130(void *ctx) {
|
||||
(void)ctx;
|
||||
return 0;
|
||||
//return (int16_t)(CKP_PULSE_AVAILABLE ? 0 : -1);
|
||||
|
||||
}
|
||||
|
||||
/* supply_voltage (0x0142): battery/supply voltage.
|
||||
* TODO: wire to the project's VBAT ADC reading. */
|
||||
static uint16_t fbkw_get_supply_voltage(void *ctx) {
|
||||
(void)ctx;
|
||||
return (uint16_t)(725);//13.5 * its factor 54
|
||||
return (uint16_t)(736);//13.5 * its factor 54
|
||||
}
|
||||
|
||||
/* temperature (0x0146): temperature input.
|
||||
@@ -141,6 +143,8 @@ void FBKW_service(void) {
|
||||
* available — matches the VP44 boot/CKP-lost reset behavior. */
|
||||
if (!CKP_PULSE_AVAILABLE) {
|
||||
fbkw_rt.reset_flag = 1;
|
||||
fbkw_rt.system_flags_110 = 0x30;
|
||||
fbkw_rt.mode_flags = 1;//muy importantes estas mierdas para que en open loop vaya como toca.
|
||||
}
|
||||
|
||||
pwm_service(&fbkw_rt);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Source ROM: rom_eeprom_dump_0000-9FFF_004002.bin
|
||||
* Calibration base (RWA4): 0x9C28
|
||||
* Flash anchor: 0x9618
|
||||
* Generated: 2026-04-18 13:52:55
|
||||
* Generated: 2026-04-20 13:49:45
|
||||
*
|
||||
* DO NOT EDIT — regenerate with:
|
||||
* python tools/extract_calibration.py rom_eeprom_dump_0000-9FFF_004002.bin --target compact
|
||||
|
||||
Reference in New Issue
Block a user