My modifications/additions to the code

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 Servo fishgait mbed-rtos mbed pixy_cam

Fork of robotic_fish_ver_4_8 by jetfishteam

Committer:
sandwich
Date:
Thu Jun 05 17:32:51 2014 +0000
Revision:
23:ef1be367726e
Parent:
22:807d5467fbf6
Child:
24:9d75ed1462d6
-has tele-op and autonomous mode; -left slider now controls gain on pitch; -works with syren now; -uses rtos thread model for better multitasking

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sandwich 0:ff9bc5f69c57 1 #include "mbed.h"
sandwich 2:430c068cf570 2 #include "Servo.h"
sandwich 7:e005cfaff8d1 3 //#include "rtos.h"
rkk 8:0574a5db1fc4 4 //#include "PwmReader.h"
rkk 11:8ec915eb70f6 5 //#include "PwmIn.h"
rkk 11:8ec915eb70f6 6 #include "MainController.h"
sandwich 2:430c068cf570 7 Serial pc(USBTX, USBRX);
sandwich 7:e005cfaff8d1 8 Timer t;
rkk 11:8ec915eb70f6 9
sandwich 7:e005cfaff8d1 10 int main()
sandwich 7:e005cfaff8d1 11 {
sandwich 0:ff9bc5f69c57 12 t.start();
sandwich 22:807d5467fbf6 13
rkk 11:8ec915eb70f6 14 MainController mainCtrl;
sandwich 22:807d5467fbf6 15
rkk 11:8ec915eb70f6 16 mainCtrl.start();
rkk 11:8ec915eb70f6 17
sandwich 22:807d5467fbf6 18 //printf("started\n");
rkk 12:7eeb29892625 19 while(true) {
sandwich 23:ef1be367726e 20 pc.printf("control: %d, frq: %.3f, vol: %.2f, amp: %.3f, yaw: %.2f, dut: %.2f, pit: %.2f, adj: %.2f, t: %.2f\n",
sandwich 23:ef1be367726e 21 mainCtrl.getOpMode(), mainCtrl.getFrequency(), mainCtrl.getVolume(), mainCtrl.getAmplitude(), mainCtrl.getYaw(), mainCtrl.getDutyCycle(), mainCtrl.getPitch(), mainCtrl.getAdj(), t.read());
rkk 12:7eeb29892625 22
sandwich 23:ef1be367726e 23 //wait_ms(100);
sandwich 0:ff9bc5f69c57 24 }
rkk 12:7eeb29892625 25 //t.stop();
rkk 12:7eeb29892625 26 //mainCtrl.stop();
sandwich 0:ff9bc5f69c57 27 }