7 julaa
Dependencies: mbed LCD_DISCO_F469NIa SD_DISCO_F469NI BSP_DISCO_F469NIa EEPROM_DISCO_F469NI
Diff: main.cpp
- Revision:
- 6:1fda11b7b0b9
- Parent:
- 4:0e8413277df8
--- a/main.cpp Wed Nov 28 12:01:20 2018 +0000 +++ b/main.cpp Sun Mar 07 15:44:19 2021 +0000 @@ -6,7 +6,7 @@ LCD_DISCO_F469NI lcd; //Initialize LCD Display SD_DISCO_F469NI sd; //Initialize SD Card //EEPROM_DISCO_F469NI eep; //Initialize EEPROM Internal memory -Serial pc(USBTX, USBRX); //Initialize Serial. This is used only while debuging code. +Serial pc(USBTX, USBRX,115200); //Initialize Serial. This is used only while debuging code. CAN can(PB_5, PB_13,1000000); //Initialize CAN. I2C i2c(D14, D15); DigitalOut reset(D8); @@ -57,7 +57,7 @@ } void showLedRpm(int RPM){ - pc.printf("%d\n",RPM); + //pc.printf("%d\n",RPM); if(RPM<1000) { cmd[1]=0xFF; cmd[2]=0xFF; @@ -120,18 +120,20 @@ int main(){ +//pc.printf("proba\n"); LEDInitialize(); can.attach(&CANMsgReceive,CAN::RxIrq); // Attach interrupt function to CAN RX change_screen_input.rise(&ChangeCommand); //Attach interrupt function to rising edge of DigitalIn for changing screen. SetIntro(); // Display logo when starting display SetMain(); // First screen is main by default sd.Init(); - + //pc.printf("proba1\n"); while(1){ if(change_flag){ // Check if screen is changed ChangeScreen(); }; UpdateInfo(); // Update info for DTA values in every iteration + //pc.printf("proba2\n"); switch(screen_flag){ // Display only changes visible on current screen case(1): MainUpdate();