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 MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: global.cpp
- Revision:
- 123:0a74e696f7a6
- Parent:
- 121:1d5b3e1f0d21
- Child:
- 125:0e4f65eda4b1
--- a/global.cpp Tue Apr 05 06:57:21 2022 +0000
+++ b/global.cpp Mon Apr 11 09:39:30 2022 +0000
@@ -16,6 +16,8 @@
//UsaPack sensor1(PC_10, PC_11, 115200);
//UsaPack sensor2(PC_12, PD_2, 115200);
CalibrateMagneto magCalibrator;
+AnalogIn ain_v(PA_3);
+AnalogIn ain_i(PC_0);
// io
DigitalIn userButton(USER_BUTTON);
@@ -45,6 +47,9 @@
int16_t gx, gy, gz;
float magval[3] = {1.0f, 0.0f, 0.0f};
+float voltage = 0.0f;
+float current = 0.0f;
+
// elevator
float de;
float deobj;