void DebugFormClass::onEvent(Genie& genie, genieFrame& evt){ //Handles the touch screen button press switch (evt.reportObject.index){ //Enable can analyzer via serial port case CAN_ON_SERIAL_BUTTON: INIT_SERIAL(CAN_DEBUG_SERIAL, CAN_SERIAL_BAUD); canInterface.setCanDebugSerial(&CAN_DEBUG_SERIAL); break; //Enable can analyzer via bluetooth case CAN_ON_BLUETOOTH_BUTTON: INIT_SERIAL(BL_SERIAL, CAN_SERIAL_BAUD); canInterface.setCanDebugSerial(&BL_SERIAL); telemetryInterface.setLogSerial(NULL); break; case CAN_STOP_BUTTON: INIT_SERIAL(BL_SERIAL, BL_SERIAL_BAUD); canInterface.setCanDebugSerial(NULL); telemetryInterface.setLogSerial(&BL_SERIAL); break; //Switch to the maps form case DRIVER_SETTING_BUTTON: displayInterface.setCurrentForm(&mapsForm); break; //Enable BMS debug mode case BMS_DEBUG_BUTTON: BMS.setDebugMode(); break; } }
void malyan_lcd_init() { // Port Register PORTJ |= 1<<0; // TXD logic high PORTJ &= ~(1<<1); // RXD high impedance // Data Direction DDRJ &= ~(1<<1); // RXD Input DDRJ |= 1<<0; // TXD Output INIT_SERIAL(3); //building = false; buff_state=0; writeString((char *)"{SYS:STARTED}"); writeString((char *)"{U:RG1R180180120P0L1S0D0O1E1H0C0X1Y1Z1A2B2N3M0}"); }