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 PowerControl
Fork of Projet_S5 by
Diff: analyzer.cpp
- Revision:
- 7:89be89aeed5a
- Parent:
- 6:ef8bfca9e69b
- Child:
- 8:9bf215a760f5
--- a/analyzer.cpp Thu Apr 03 15:04:49 2014 +0000 +++ b/analyzer.cpp Sat Apr 05 18:07:45 2014 +0000 @@ -15,7 +15,18 @@ void Analyzer::checkMouvement() { + Serial pc(USBTX, USBRX); + pc.printf("Init: %i, min: %i, max: %i\n", x.initial, x.min, x.max); + pc.printf("Init: %i, min: %i, max: %i\n", y.initial, y.min, y.max); + pc.printf("Init: %i, min: %i, max: %i\n", z.initial, z.min, z.max); +} + +void Analyzer::setInitial(signed char* init) +{ + x.setInitial(init[0]); + y.setInitial(init[1]); + z.setInitial(init[2]); } extern "C" void *Analyzer_C_new() @@ -35,6 +46,12 @@ an->setMinMax(values); } +extern "C" void Analyzer_C_setInitial(signed char* init, void *analyzer) +{ + Analyzer *an = (Analyzer*)analyzer; + an->setInitial(init); +} + extern "C" void Analyzer_C_checkMouvement(void *analyzer) { Analyzer *an = (Analyzer*)analyzer;