The Technology Partnership / Mbed 2 deprecated V2_Heater_test_code

Dependencies:   mbed MODSERIAL

Revision:
2:b1f6e4f51d06
Parent:
1:ad9199cbfc4b
Child:
3:5d99b45d534a
diff -r ad9199cbfc4b -r b1f6e4f51d06 main.cpp
--- a/main.cpp	Mon Aug 12 10:48:11 2019 +0000
+++ b/main.cpp	Mon Aug 12 10:53:53 2019 +0000
@@ -1,8 +1,6 @@
 #include "mbed.h"
 #include "MODSERIAL.h"
-#include "Watchdog.h"
 #include "ADS8568_ADC.h"
-#include "Heater.h"
 #include "FastPWM.h"
 
 #include "math.h"
@@ -15,9 +13,8 @@
 ------------------------------------------------------------------------------*/
 
 #define ALL_CH 15               //value of convst bus to read all chanels simultaneosly
-
+#define TICK_CYCLE          1000// Tick cylcle
 
-Watchdog wd;                    //instantiate watchdog class
 
 MODSERIAL pc(PA_9, PA_10, 512); //mcu TX, RX, 512 byte TX and RX buffers
 
@@ -68,15 +65,6 @@
 int i = 0;
 int log_count = 0;
 
-float cur1 = 0;
-float cur2 = 0;
-float R1 = 0;
-float R2 = 0;
-float scale_factors[8];
-float scale_factor = 13.273;
-int drivetime_ms = 0;
-int OSR = 1;
-float R_avg = 0;
 
 char outString[100];
 
@@ -85,11 +73,6 @@
 const float h1_slope = 0.0019;
 const float h2_slope = 0.0019;
 
-
-Heater heater_1(0,1,&drive_1, &guard_1, h1_inter, h1_slope);
-Heater heater_2(2,3,&drive_2, &guard_2, h2_inter, h2_slope);
-
-
 int main()
 {
     // Initialsation
@@ -97,7 +80,6 @@
     //led_1 = drive_1; //tie led 1 and heater 1 outputs together so LED shows while heater is on (initial debug purposes only)
     adc.init();                     //initialise ADC
     timer.start();                  //Start the timer   
-    drivetime_ms = 50;
     
     //Initialise drive periods
     drive_1.prescaler(1);