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.
Fork of initExoVars by
Diff: initExoVars.cpp
- Revision:
- 11:7b7d30293fb7
- Parent:
- 10:29955bf36492
- Child:
- 12:3a5a9bbf1c93
--- a/initExoVars.cpp Mon Jun 29 23:58:12 2015 +0000
+++ b/initExoVars.cpp Tue Jun 30 04:44:30 2015 +0000
@@ -4,6 +4,8 @@
#include "HipControl.h"
#include "knee.h"
#include "FSM.h"
+#include "localRead.h"
+
//#include "MM_gait.h"
//#include "constants.h"
@@ -100,15 +102,20 @@
//zero_enc_offset_X is the offset for a particular encoder. Must be tuned for an individual encoder based on assembly.
// Offsets for Exo #1. These are related to individual encoder and should never be changed.
-float zero_enc_offset_L = 223.83;
+//float zero_enc_offset_L = 223.83;
// zero_enc_offset_R should be negative
-float zero_enc_offset_R = -176.4;
-float bob_dole=-176.4;
+//float zero_enc_offset_R = -176.4;
+//float bob_dole=-176.4;
// Offsets for Test Rig
//float zero_enc_offset_L = 205.24;
// zero_enc_offset_R should be negative
//float zero_enc_offset_R = -135.17;
//float bob_dole=-135.17;
+//extern float
+float zero_enc_offset_L=EncOffset_L;
+//extern float
+//float zero_enc_offset_Right=EncOffset_R;
+float bob_dole=EncOffset_R;
//Offset for Test Rig
@@ -159,12 +166,14 @@
void initializeExoIOs()
{
- pc.printf("\r\n entered initexoios");
// Putting various comm pins high
DB_cs = 1; // Setting SPI CS pin high (so low selects the slave)
//pc.baud(921600);
//pc.baud(921600);
//readCalib();
+ localRead();
+ pc.printf("I read the local file!");
+ pc.printf("\r\nNew left offset:%f, New left offset:%f", zero_enc_offset_L, zero_enc_offset_R);
zero_ang_L=zero_enc_offset_L+stand_adjust;
zero_ang_R=zero_enc_offset_R+stand_adjust;
pc.printf("\r\nzero ang assigned");
@@ -173,7 +182,6 @@
knee_L.init();
knee_R.init();
//Setting pwm frequencies to 20kHz
- pc.printf("\r\n knees init");
hip_L.off();
hip_R.off();
