LEX_Threaded_Programming

Dependencies:   Heater_V2 MODSERIAL Nanopb FastPWM ADS8568_ADC

Revision:
26:e2e834e16367
Parent:
24:f59af7a2effb
Child:
27:0ee855da5ba9
diff -r 5c76692cf02b -r e2e834e16367 main.cpp
--- a/main.cpp	Thu Oct 03 09:38:15 2019 +0000
+++ b/main.cpp	Thu Oct 17 10:29:36 2019 +0000
@@ -201,7 +201,8 @@
     while(1){
         flags.wait_any(0x2,osWaitForever,true);
         //Output time, R_ref, R, error, error_integrated
-        pc.printf("%10d,%10d,%10.6f,%10.6f,%10.6f,%10.6f\n", heater_ID, timer.read_ms(), heater->Get_R(), heater->Get_R_ref(), pressure_in, pressure_out);
+        pc.printf("%10d,%10d,%10.6f,%10.6f,%10.6f,%10.6f,%10.6f,%10.6f,%10.6f,%10.6f\n", 
+            heater_ID, timer.read_ms(), heater->Get_R_avg(), heater->Get_R_ref(), heater->Get_R(), heater->Get_error(), heater->Get_error_integrated(), heater->Get_D(), pressure_in, pressure_out);
         wait_us(200);//Give other threads time to get selected
    }
 }
@@ -342,7 +343,7 @@
     heat_tick.attach_us(& temp_trigger,exp_config.thermal.thermal_control_loop_interval_ms * 1000);  
 
     pc.printf("# Starting routine\n");
-    pc.printf("heater id, time (ms), measured resistance (ohms), resistance setpoint (ohms), pressure in (adc), pressure out (adc)\n");
+    pc.printf("heater id, time (ms), R_avg (Ohm), R_set (Ohm), R (Ohm), Err (Ohm), Err_int (Ohm.ms), Duty cycle, P1 (ADC), P2 (ADC)\n");
     timer.start();
     set_point_routine(profile);