Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Diff: Inverter/Inverter.cpp
- Revision:
- 9:d7eb815cb057
- Parent:
- 7:dc5f27756e02
- Child:
- 10:370851e6e132
--- a/Inverter/Inverter.cpp Wed Apr 13 04:09:56 2016 +0000 +++ b/Inverter/Inverter.cpp Tue May 10 01:15:57 2016 +0000 @@ -62,6 +62,8 @@ SetDTC(0.0f, 0.0f, 0.0f); wait(.2); ZeroCurrent(); + wait(.1); + DisableInverter(); } void Inverter::SetDTC(float DTC_A, float DTC_B, float DTC_C){ @@ -85,10 +87,11 @@ I_B_Offset += ADC1->DR; I_C_Offset += ADC2->DR; ADC1->CR2 |= 0x40000000; + wait(.0001); } I_B_Offset = I_B_Offset/1000.0f; I_C_Offset = I_C_Offset/1000.0f; - printf("B_Offset: %f C_Offset: %f\n\r", I_B_Offset, I_C_Offset); + //printf("B_Offset: %f C_Offset: %f\n\r", I_B_Offset, I_C_Offset); } void Inverter::GetCurrent(float *A, float *B, float *C){