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
analyzer.cpp
- Committer:
- joGenie
- Date:
- 2014-04-05
- Revision:
- 7:89be89aeed5a
- Parent:
- 6:ef8bfca9e69b
- Child:
- 8:9bf215a760f5
File content as of revision 7:89be89aeed5a:
#include "analyzer.h" Analyzer::Analyzer() {} Analyzer::~Analyzer() {} void Analyzer::setMinMax(signed char* values) { x.setMinMax(values[0]); y.setMinMax(values[1]); z.setMinMax(values[2]); } 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() { return new Analyzer(); } extern "C" void Analyzer_C_delete(void *analyzer) { Analyzer *an = (Analyzer*)analyzer; delete an; } extern "C" void Analyzer_C_setMinMax(signed char* values, void *analyzer) { Analyzer *an = (Analyzer*)analyzer; 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; an->checkMouvement(); }