addeed the correct scaling for the current sensor
This commit is contained in:
parent
5213a4a2e0
commit
7a4494f5ef
@ -4,6 +4,7 @@
|
|||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "stm32f3xx_hal.h"
|
#include "stm32f3xx_hal.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
StateHandle state;
|
StateHandle state;
|
||||||
int16_t RELAY_BAT_SIDE_VOLTAGE;
|
int16_t RELAY_BAT_SIDE_VOLTAGE;
|
||||||
@ -24,7 +25,7 @@ void sm_update(){
|
|||||||
|
|
||||||
RELAY_BAT_SIDE_VOLTAGE = module.auxVoltages[0] * 12.42; // the calculation says the factor is 11.989. 12.42 yields the better result
|
RELAY_BAT_SIDE_VOLTAGE = module.auxVoltages[0] * 12.42; // the calculation says the factor is 11.989. 12.42 yields the better result
|
||||||
RELAY_ESC_SIDE_VOLTAGE = module.auxVoltages[1] * 12.42;
|
RELAY_ESC_SIDE_VOLTAGE = module.auxVoltages[1] * 12.42;
|
||||||
CURRENT_MEASUREMENT = module.auxVoltages[2] / 2.2;
|
CURRENT_MEASUREMENT = (module.auxVoltages[2] - 2496) * 300;
|
||||||
|
|
||||||
switch (state.current_state) {
|
switch (state.current_state) {
|
||||||
case STATE_INACTIVE:
|
case STATE_INACTIVE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user