 
 #include <SPI.h>
-#include "mcp_can.h"
+#include <mcp_can.h>
 #include "BMW_R1200_GS_K25_CAN_Bus_Defines.h"
 #include "BMW_R1200_GS_K25_State.h"
 
 /* Compile time Flags */
 #define DEBUG 0
+#define PRINT_TO_SERIAL_CONSOLE 1
 
 /* Helper Macros */
 #define HI_NIBBLE(b) (((b) >> 4) & 0x0F)

    // BRAKE LEVERS
    byte value = LO_NIBBLE(data[6]);
    motorcycle_state.brake_levers = (K25_Brake_Lever_State)value;
    DEBUG_PRINT("Brake Levers: ");
    if( value == 0x07 ) DEBUG_PRINT("Front");
    else if( value == 0x0B ) DEBUG_PRINT("Rear");
    else if( value == 0x03 ) DEBUG_PRINT("None");
    else DEBUG_PRINT("ERROR-Other");
    DEBUG_PRINT_LN("");

    // ABS Status
    value = HI_NIBBLE(data[1]);
    motorcycle_state.abs_system = (K25_ABS_State)value;
    DEBUG_PRINT("ABS: ");
    if( value == 0x05 ) DEBUG_PRINT("ON");
    else if( value == 0x0B ) DEBUG_PRINT("OFF");
    else DEBUG_PRINT("ERROR-Other");
    DEBUG_PRINT_LN("");
}

void handle_MSG_ID_BMSK_Control_Module(unsigned char *data, unsigned char length)

void loop()
{
    process_CAN_Messages();
#if PRINT_TO_SERIAL_CONSOLE
    print_motorcycle_state();
#endif
}

void print_motorcycle_state()
{
    Serial.print("Throttle Position: ");
    Serial.print(motorcycle_state.throttle_position, DEC);
    Serial.println();

    Serial.print("Heated Grips: ");
    if( motorcycle_state.heated_grips == K25_Heated_Grips_State_off ) Serial.print("OFF");
    else if( motorcycle_state.heated_grips == K25_Heated_Grips_State_low ) Serial.print("LOW");
    else if( motorcycle_state.heated_grips == K25_Heated_Grips_State_high ) Serial.print("HIGH");
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("Turn Signals: ");
    if( motorcycle_state.turn_signals == K25_Turn_Signals_State_off ) Serial.print("OFF");
    else if( motorcycle_state.turn_signals == K25_Turn_Signals_State_left ) Serial.print("LEFT");
    else if( motorcycle_state.turn_signals == K25_Turn_Signals_State_right ) Serial.print("RIGHT");
    else if( motorcycle_state.turn_signals == K25_Turn_Signals_State_both ) Serial.print("HAZARDS");    
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("High Beam: ");
    if( motorcycle_state.high_beam == K25_High_Beam_State_off ) Serial.print("OFF");
    else if( motorcycle_state.high_beam == K25_High_Beam_State_on ) Serial.print("ON");   
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("Info Button: ");
    if( motorcycle_state.info_button == K25_Info_Button_State_short_press ) Serial.print("SHORT");
    else if( motorcycle_state.info_button == K25_Info_Button_State_long_press ) Serial.print("LONG");   
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("Clutch: ");
    if( motorcycle_state.clutch == K25_Clutch_Lever_State_out ) Serial.print("OUT");
    else if( motorcycle_state.clutch == K25_Clutch_Lever_State_in ) Serial.print("IN");   
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("Brakes: ");
    if( motorcycle_state.brake_levers == K25_Brake_Lever_State_none ) Serial.print("NONE");
    else if( motorcycle_state.brake_levers == K25_Brake_Lever_State_front ) Serial.print("FRONT");  
    else if( motorcycle_state.brake_levers == K25_Brake_Lever_State_rear ) Serial.print("REAR");  
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("ABS: ");
    if( motorcycle_state.abs_system == K25_ABS_State_off ) Serial.print("OFF");
    else if( motorcycle_state.abs_system == K25_ABS_State_on ) Serial.print("ON");  
    else Serial.print("Unknown"); 
    Serial.println();

    Serial.print("ALS: ");
    if( motorcycle_state.als == K25_ALS_State_dark ) Serial.print("DARK");
    else if( motorcycle_state.als == K25_ALS_State_light ) Serial.print("LIGHT");  
    else Serial.print("Unknown"); 
    Serial.println();
}

void setup_CAN_Bus_Filters()
