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: run.cpp
- Revision:
- 85:0b14a2a600fc
- Parent:
- 84:028bd650e8bc
- Child:
- 86:6b8e797306b6
diff -r 028bd650e8bc -r 0b14a2a600fc run.cpp
--- a/run.cpp Mon Dec 06 12:58:20 2021 +0000
+++ b/run.cpp Fri Dec 10 12:15:01 2021 +0000
@@ -2,13 +2,14 @@
void run()
{
- /*
+
pc.printf("reading calibration value\r\n");
//キャリブレーション値を取得
U read_calib;
readEEPROM(eeprom_address, eeprom_pointeraddress, read_calib.c, N_EEPROM*4);
wait(3);
pos_tail = (int)read_calib.i[0];
+ /*
agoffset[3] = float(read_calib.i[7]);
agoffset[4] = float(read_calib.i[8]);
agoffset[5] = float(read_calib.i[9]);
@@ -23,7 +24,7 @@
magCalibrator.setExtremes(magbiasMin,magbiasMax);
// tail_address[pos_tail] = (int)read_calib.i[10];
*/
-
+ /*
//センサの初期化・ジャイロバイアス・加速度スケールの取得
int n_init = 1000;
for(int i = 0;i<n_init;i++){
@@ -48,6 +49,7 @@
magref.y /= float(n_init);
magref.z /= float(n_init);
palt0 /= float(n_init);
+ */
switch(pos_tail){
case 0:
@@ -186,6 +188,7 @@
if(preflightCheck == true){
break;
}
+ break; //pre-flight checkなし
}
tail.Subscribe(tail_address[pos_tail], &(updateValues));
@@ -214,7 +217,7 @@
theading = _t.read();
}
}
-
+ /*
if(updateValues.gpsUpdateFlag == true){
Vector3 pi(updateValues.pi[0], updateValues.pi[1], updateValues.pi[2]);
Vector3 vi(updateValues.vi[0], updateValues.vi[1], updateValues.vi[2]);
@@ -234,6 +237,7 @@
eskf.updateAcc(MatrixMath::Vector2mat(acc),Racc);
}
}
+ */
PIDtick.loop();
//制御時間を計測