GroupA / Mbed 2 deprecated Lab_6_WaG

Dependencies:   mbed

Fork of WaG by GroupA

Revision:
49:80d4ffabec16
Parent:
46:85c4b722baa7
Child:
50:e3a03bc1e1a6
--- a/main.cpp	Fri Mar 30 20:28:41 2018 +0000
+++ b/main.cpp	Tue Apr 03 16:31:18 2018 +0000
@@ -38,6 +38,7 @@
 BusOut mux_select(MUX_S0, MUX_S1, MUX_S2, MUX_S3);
 int station = -1;
 int *cal_status = NOT_CALIBRATED;
+float sensor_values[TGT_SENSOR_QUAN * 2];
 
 struct spi_cfg as1107{
     SPI_AS1107_ID,
@@ -59,26 +60,23 @@
 
     pc.printf("Press user button to test.\n");
     
+    /*
     test_target_leds();
     pc.printf("LED's tested\n");
     
     test_phototransistors();
     pc.printf("Phototransistors tested\n");
     
+    */
+    
     step_test();
     pc.printf("Step motor tested.");
     
     pc.printf("laser test\n");
-    while(1){
-        lzr_on();
-        wait(0.5);
-        lzr_off();
-        wait(0.5);
-    }
-    /*
     while (my_button.read() == 0);
     pc.printf("test begin\n");
     lzr_init();
+    wait(0.5);
     while (my_button.read() == 0) {
         lzr_on();
         wait(0.5);
@@ -86,7 +84,12 @@
         wait(0.5);
     }
     lzr_init();
-    */
+    pc.printf("Laser tested.\n");
+    
     // determine if the wag is connected to station A or station B
     station = station_select.read();
+    
+    pc.printf("test part 9 begin\n");
+    stp_calibrate(station, sensor_values, cal_status);
+    pc.printf("test part 9 done\n");
 } 
\ No newline at end of file