(Almost done) pin refactoring
[matches/MCTX3420.git] / server / main.c
index 930b8b0..2ad9dcc 100644 (file)
@@ -9,6 +9,7 @@
 #include "sensor.h"
 #include "actuator.h"
 #include "control.h"
+#include "pin_test.h"
 #include "bbb_pin_defines.h"
 
 // --- Standard headers --- //
@@ -27,6 +28,10 @@ Options g_options; // options passed to program through command line arguments
  */
 void ParseArguments(int argc, char ** argv)
 {
+       // horrible horrible hacks
+       g_options.argc = argc;
+       g_options.argv = argv;
+
        g_options.program = argv[0]; // program name
        g_options.verbosity = LOGDEBUG; // default log level
        gettimeofday(&(g_options.start_time), NULL); // Start time
@@ -112,6 +117,7 @@ int main(int argc, char ** argv)
        */
        Sensor_Init();
        Actuator_Init();
+       Pin_Init();
        //Sensor_StartAll("test");
        //Actuator_StartAll("test");
        const char *ret;
@@ -126,6 +132,8 @@ int main(int argc, char ** argv)
        //Sensor_StopAll();
        //Actuator_StopAll();
 
+       Pin_Close();
+
        Cleanup();
        return 0;
 }

UCC git Repository :: git.ucc.asn.au