lib for realtimeMM funcs

Fork of realtimeMMLib by Graham Nicholson

Committer:
GTNicholson
Date:
Thu Feb 15 16:35:50 2018 +0000
Revision:
1:13301255d95a
Parent:
0:9f82ee1feae7
v4 lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GTNicholson 0:9f82ee1feae7 1
GTNicholson 0:9f82ee1feae7 2 #include "MBedStation.h"
GTNicholson 0:9f82ee1feae7 3 #include "sensor_base.h"
GTNicholson 0:9f82ee1feae7 4 #include "qeihw.h"
GTNicholson 0:9f82ee1feae7 5 #include <cstdint>
GTNicholson 0:9f82ee1feae7 6
GTNicholson 0:9f82ee1feae7 7
GTNicholson 0:9f82ee1feae7 8 MBedStation::MBedStation()
GTNicholson 0:9f82ee1feae7 9 {
GTNicholson 0:9f82ee1feae7 10
GTNicholson 0:9f82ee1feae7 11 }
GTNicholson 0:9f82ee1feae7 12
GTNicholson 0:9f82ee1feae7 13 //sensor_base MBed::sensors[1]
GTNicholson 0:9f82ee1feae7 14
GTNicholson 0:9f82ee1feae7 15 void MBedStation::setup()
GTNicholson 0:9f82ee1feae7 16 {
GTNicholson 0:9f82ee1feae7 17
GTNicholson 0:9f82ee1feae7 18 sensor_onoff sensor0(p5);
GTNicholson 0:9f82ee1feae7 19 sensor0.sensor_id = 1;
GTNicholson 0:9f82ee1feae7 20 sensor0.enabled = true;
GTNicholson 0:9f82ee1feae7 21 MBedStation::sensors[0] = sensor0;
GTNicholson 0:9f82ee1feae7 22 sensor_0 = sensor0;
GTNicholson 0:9f82ee1feae7 23
GTNicholson 0:9f82ee1feae7 24 sensor_vin sensor1(p15);
GTNicholson 0:9f82ee1feae7 25 sensor1.sensor_id = 2;
GTNicholson 0:9f82ee1feae7 26 sensor1.enabled = true;
GTNicholson 0:9f82ee1feae7 27 MBedStation::sensors[1] = sensor1;
GTNicholson 0:9f82ee1feae7 28 sensor_1 = sensor1;
GTNicholson 0:9f82ee1feae7 29
GTNicholson 0:9f82ee1feae7 30 sensor_vin sensor2(p16);
GTNicholson 0:9f82ee1feae7 31 sensor2.sensor_id = 3;
GTNicholson 0:9f82ee1feae7 32 sensor2.enabled = true;
GTNicholson 0:9f82ee1feae7 33 MBedStation::sensors[2] = sensor2;
GTNicholson 0:9f82ee1feae7 34 sensor_2 = sensor2;
GTNicholson 0:9f82ee1feae7 35
GTNicholson 0:9f82ee1feae7 36 /*
GTNicholson 0:9f82ee1feae7 37 sensor_pulse sensor3(p6);
GTNicholson 0:9f82ee1feae7 38 sensor3.sensor_id = 4;
GTNicholson 0:9f82ee1feae7 39 sensor3.enabled = true;
GTNicholson 0:9f82ee1feae7 40 MBedStation::sensors[3] = sensor3;
GTNicholson 0:9f82ee1feae7 41 sensor_3 = sensor3;
GTNicholson 1:13301255d95a 42
GTNicholson 1:13301255d95a 43
GTNicholson 1:13301255d95a 44 sensor_max6675 sensor4(p11,p12,p13,p18);
GTNicholson 1:13301255d95a 45 sensor4.sensor_id = 5;
GTNicholson 1:13301255d95a 46 sensor4.enabled = true;
GTNicholson 1:13301255d95a 47 MBedStation::sensors[4] = sensor4;
GTNicholson 1:13301255d95a 48 sensor_4 = sensor4;
GTNicholson 1:13301255d95a 49
GTNicholson 1:13301255d95a 50
GTNicholson 1:13301255d95a 51 sensor_max6675 sensor5(p11,p12,p13,p17);
GTNicholson 1:13301255d95a 52 sensor5.sensor_id = 6;
GTNicholson 1:13301255d95a 53 sensor5.enabled = true;
GTNicholson 1:13301255d95a 54 MBedStation::sensors[5] = sensor5;
GTNicholson 1:13301255d95a 55 sensor_5 = sensor5;
GTNicholson 1:13301255d95a 56 */
GTNicholson 1:13301255d95a 57
GTNicholson 0:9f82ee1feae7 58 }