Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: main.cpp
- Revision:
- 130:639cd8586f86
- Parent:
- 126:498f56ba051e
- Child:
- 131:031df63c7dbc
--- a/main.cpp Sun Apr 30 06:45:56 2017 +0000 +++ b/main.cpp Sun Apr 30 08:53:22 2017 +0000 @@ -27,10 +27,6 @@ FOCStruct foc; ControlStruct control; -DigitalOut test(PC_5); -int time_counter = 0; -float test_dtc = 0.2f; - DQMapper *dq; ThrottleMapper *th; @@ -67,7 +63,7 @@ loop_counter++; /*update position, sin, cos*/ - foc.p = io.pos->GetElecPosition() - POS_OFFSET;// + read.w / 1048.0f; + foc.p = io.pos->GetElecPosition() - POS_OFFSET; float sin_p = sinf(foc.p); float cos_p = cosf(foc.p); @@ -184,7 +180,7 @@ } int main() { - dq = new LutMapper();//DirectMapper(-130.0f, 43.0f); + dq = new LutMapper(); th = new NullThrottleMapper(); BREMSInit(&io, &read, &foc, &control, false);