addeed the correct scaling for the current sensor
This commit is contained in:
		@ -4,6 +4,7 @@
 | 
			
		||||
#include "errors.h"
 | 
			
		||||
#include "stm32f3xx_hal.h"
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
StateHandle state;
 | 
			
		||||
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_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) {
 | 
			
		||||
    case STATE_INACTIVE:
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user