  * 26 Sep 2015 - 2.1.2 - Alek Lidtke - put arming modules into a dedicated function to not freeze the GUI when doing so.
  */
 
-//#define DEBUG_PRINTOUT
+//#define DEBUG_PRINTOUT // this will cause issues with arming modules as the GUI expects a delay in ms to be returned upon sending "armModules,1"; either fix or don't use the GUI in conjuction with this flag
 
 // Custom includes.
 #include "Module.h"


// Pins are pairs of close-by pins with PWM and digital ones.
BrushlessDCMotor engine1 = BrushlessDCMotor("motorPortHor", THROTTLE_STEPS, MOTOR_MAX_PULSE_WIDTH,
	MOTOR_MIN_PULSE_WIDTH, MOTOR_ARM_PULSE_WIDTH, 9, 8);
BrushlessDCMotor engine2 = BrushlessDCMotor("motorStbdHor", THROTTLE_STEPS, MOTOR_MAX_PULSE_WIDTH,
	MOTOR_MIN_PULSE_WIDTH, MOTOR_ARM_PULSE_WIDTH, 6, 7);
BrushlessDCMotor engine3 = BrushlessDCMotor("motorPortVer", THROTTLE_STEPS,MOTOR_MAX_PULSE_WIDTH,
	MOTOR_MIN_PULSE_WIDTH, MOTOR_ARM_PULSE_WIDTH, 5, 4);
BrushlessDCMotor engine4 = BrushlessDCMotor("motorStbdVer", THROTTLE_STEPS, MOTOR_MAX_PULSE_WIDTH,
	MOTOR_MIN_PULSE_WIDTH, MOTOR_ARM_PULSE_WIDTH, 3, 2);

/* =============================================================================
 * MISC ACTUATOR AND COMMAND DEFINITIONS.

/* Prepare to listen to commands over serial and start everything up. */
{
	armModulesModule.setValue(0); // Don't arm the modules by default, wait for a command.
	refreshRate.setValue(10); // Set default delay in milliseconds in the main loop
	forwardLED.setValue(0);
	
	// set modes for pins used by simple switch modules
	pinMode(ON_LED_PIN, OUTPUT);
	pinMode(FORWARD_LED_PIN, OUTPUT);

	//TODO: do some system checks, like battery level, connections etc.

