2018-05-01 14:51:41 +02:00
|
|
|
#ifndef __DIAGNOSTICS_H_
|
|
|
|
#define __DIAGNOSTICS_H_
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
// Constantes
|
2018-05-06 18:35:26 +02:00
|
|
|
#define DIAGNOSTIC_INTERVAL 100
|
2018-05-01 14:51:41 +02:00
|
|
|
#define DIAGNOSTIC_POLL_INTERVAL 100
|
|
|
|
#define DIAGNOSTIC_SERIAL_TIMEOUT 10000
|
|
|
|
|
2018-05-06 18:35:26 +02:00
|
|
|
#define DIAGNOSTIC_TENSION_TEST 3
|
2018-05-07 20:25:38 +02:00
|
|
|
#define DIAGNOSTIC_CODEUSES_DIFF_MIN 100
|
2018-05-06 18:35:26 +02:00
|
|
|
#define DIAGNOSTIC_TEMPS_ROTATION 250
|
2018-05-02 08:26:35 +02:00
|
|
|
|
2018-05-08 00:45:08 +02:00
|
|
|
typedef bool (*diagnosticFunc)(void* arg);
|
|
|
|
|
2018-05-01 14:51:41 +02:00
|
|
|
// Public
|
|
|
|
void runDiagnostics();
|
|
|
|
|
|
|
|
// Private
|
2018-05-08 00:45:08 +02:00
|
|
|
void execDiagnostic(char* name, diagnosticFunc diag, void* arg);
|
2018-05-01 14:51:41 +02:00
|
|
|
|
|
|
|
#endif
|