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.
Revision 33:9198b292a8eb, committed 2022-06-20
- Comitter:
- cdevarakonda
- Date:
- Mon Jun 20 17:12:18 2022 +0000
- Parent:
- 32:771f6d99a77b
- Commit message:
- Energyy Storage code updated, pins changed
Changed in this revision
| definitions.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 771f6d99a77b -r 9198b292a8eb definitions.cpp --- a/definitions.cpp Mon Jun 20 09:49:27 2022 +0000 +++ b/definitions.cpp Mon Jun 20 17:12:18 2022 +0000 @@ -84,9 +84,9 @@ ///Eergy Storage; -AnalogIn vref_powercab(PA_3); +AnalogIn vref_powercab(PA_0); AnalogIn vref_supercap(PF_5); -AnalogIn vout_powercab(PC_3); +AnalogIn vout_powercab(PB_1); AnalogIn vout_supercap(PF_3); ///Lights
diff -r 771f6d99a77b -r 9198b292a8eb main.cpp
--- a/main.cpp Mon Jun 20 09:49:27 2022 +0000
+++ b/main.cpp Mon Jun 20 17:12:18 2022 +0000
@@ -120,9 +120,9 @@
float energy_supercap = (1/2) * (current_supercap * current_supercap) * (t*t) / C;
float energy_powercab = (1/2) * (current_powercab * current_powercab) * (t*t) / C;
int scap = static_cast<int>(energy_supercap);
- int pcab = static_cast<int>(energy_powercab);
- remote.sendData(2,scap);
- remote.sendData(2,pcab);
+ int pcab = static_cast<int>(current_powercab);//(current_powercab);
+ remote.sendData(9,scap);
+ remote.sendData(10,pcab);
}