Francis CHATAIN / Mbed 2 deprecated MSNV2-Terminal_V1-6

Dependencies:   DmTftLibrary eeprom SX1280Lib filesystem mbed

Fork of MSNV2-Terminal_V1-5 by Francis CHATAIN

Revision:
12:e9ec35413787
Parent:
10:1b37e3b41947
Child:
13:5414193da1de
--- a/Application.cpp	Wed Aug 22 21:25:52 2018 +0000
+++ b/Application.cpp	Thu Aug 23 14:23:46 2018 +0000
@@ -18,6 +18,7 @@
 #include "Tftlcd.h"
 #include "Lora.h"
 #include "Sensor.h"
+#include "IKS01A2.h"
 
 
 static DataBase dataBase    ;       // Database creation 
@@ -28,6 +29,7 @@
 Tftlcd     tftlcd      ;   // eventuellement a déplacer   (uniquement valable sur les conf nucléo)
 Sensor     sensor      ;   // eventuellement a déplacer
 
+Iks01a2    iks01a2      ; 
 
 Application::Application()  {   // constructeur 
     // Basic  instance
@@ -69,9 +71,7 @@
     
     debugSerial = new RawSerial (USBTX,USBRX, 230400);        // Debug Link 
     tftlcd.Init () ;  
-    
     // I2C, SPI, UART .... 
-
 }
 
 
@@ -81,6 +81,8 @@
     //bme280 = new BME280(i2c_rt);
     // depend of the list identified 
     //bme280->init(config->getBME280_MODE());
+    iks01a2.init () ; 
+//    iks01a2.read () ; 
 }
 
 void Application::initActuators(){
@@ -90,26 +92,26 @@
     //bme280->init(config->getBME280_MODE());
 }
 
-void Application::manageSensors () {
-    readSensors             (); 
-    messages.buildSensors   () ; 
-    sendMessage             () ; 
+void Application::manageSensors     () {
+    readSensors                     (); 
+    messages.buildSensors           () ; 
+    sendMessage                     () ; 
 }
 
-void Application::manageGoodhealth () {
-    readSensors                         (); 
-    messages.buildGoodhealth            () ; 
-    //sendMessage                         () ; 
+void Application::manageGoodhealth  () {
+    readSensors                     (); 
+    messages.buildGoodhealth        () ; 
+    //sendMessage                   () ; 
 }
 
-void Application::manageSynchro () {
-    messages.buildSynchro             () ; 
-    //sendMessage                     () ; 
+void Application::manageSynchro     () {
+    messages.buildSynchro           () ; 
+    //sendMessage                   () ; 
 }
 
-void Application::manageConfiguration () {
-    messages.buildConfiguration     () ; 
-    //sendMessage             () ; 
+void Application::manageConfiguration   () {
+    messages.buildConfiguration         () ; 
+    //sendMessage                       () ; 
 }
 
 void Application::manageListening () {
@@ -118,7 +120,7 @@
 
 void Application::getScheduling (uint16_t &TimerPayload,  uint16_t &TimerGoodhealth, uint16_t &TimerSynchro, uint16_t &TimerListening ) {
 
-    TimerPayload        = 1L     ;   // TODO  Dépend de la lecture de la memoire  (ici simulé)
+    TimerPayload        = 2L     ;   // TODO  Dépend de la lecture de la memoire  (ici simulé)
     TimerGoodhealth     = 60L    ; 
     TimerSynchro        = 0L     ;  
     TimerListening      = 0L     ;                  
@@ -133,13 +135,14 @@
 void Application::readSensors       () {
     printf( "*** APP_ ***  readSensors \r\n");
     // depend of the list identified 
-    // Each sensor send can put a event in the db
-    }
+    // Each sensor send a event in the db
+    iks01a2.read () ; 
+}
 
 void Application::writeActuators    () {
     // depend of the list identified 
     // Each sensor send can put a event in the queu
-    }
+}