Prius IPM controller

Dependencies:   mbed

Fork of analoghalls5_5 by N K

Revision:
25:0003b824dd7d
Parent:
11:dccbaa9274c5
Child:
27:846c08fb3697
--- a/core/inverter.cpp	Mon Mar 09 11:33:14 2015 +0000
+++ b/core/inverter.cpp	Tue Mar 10 17:47:08 2015 +0000
@@ -36,7 +36,7 @@
 void Inverter::SetDtcB(float dtc) {
     if (dtc < 0) dtc = 0.0f;
     if (dtc > 1.0f) dtc = 1.0f;
-    *_pwm_b = 1.0f - dtc;
+    *_pwm_b = dtc;
 } 
 
 void Inverter::SetDtcC(float dtc) {
@@ -46,11 +46,11 @@
 }
 
 void Inverter::Enable() {
-    *_en = 0;
+    *_en = 1;
 }
 
 void Inverter::Disable() {
-    *_en = 1;
+    *_en = 0;
 }
 
 float Inverter::GetVbus() {