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.h
- Revision:
- 7:89be89aeed5a
- Parent:
- 6:ef8bfca9e69b
- Child:
- 8:9bf215a760f5
--- a/analyzer.h Thu Apr 03 15:04:49 2014 +0000
+++ b/analyzer.h Sat Apr 05 18:07:45 2014 +0000
@@ -11,6 +11,7 @@
~Analyzer();
void setMinMax(signed char* values);
+ void setInitial(signed char* value);
void checkMouvement();
private:
@@ -18,8 +19,9 @@
{
signed char min;
signed char max;
+ signed char initial;
- Data(): min(CHAR_MAX/2), max(0){}
+ Data(): min(SCHAR_MAX), max(SCHAR_MIN){}
void setMinMax(signed char value)
{
@@ -28,7 +30,14 @@
if (value > max)
max = value;
- }
+ }
+
+ void setInitial(signed char init)
+ {
+ initial = init;
+ min = initial;
+ max = initial;
+ }
};
Data x, y, z;
@@ -42,6 +51,7 @@
extern void *Analyzer_C_new();
extern void Analyzer_C_delete(void *analyzer);
extern void Analyzer_C_setMinMax(signed char* values, void *analyzer);
+extern void Analyzer_C_setInitial(signed char* value, void *analyzer);
extern void Analyzer_C_checkMouvement(void *analyzer);
#ifdef __cplusplus
