Ben Gordon
/
ELEC351_GroupA-branch1
Troubleshooting
Embed:
(wiki syntax)
Show/hide line numbers
Display.cpp
00001 #include "Display.hpp" 00002 00003 void Display::INIT() 00004 { 00005 setTemperature(0); 00006 setLightLevel(0); 00007 setPressure(0); 00008 _lcd.INIT(); 00009 00010 } 00011 00012 void Display::pageOne() 00013 { 00014 _lcd.clear(); 00015 // _lcd.disableCursor(); 00016 00017 //Temperature Display 00018 _lcd.display("T: ",LINE1); 00019 _lcd.display(_temperature); 00020 _lcd.putt(223); 00021 _lcd.display("C"); 00022 00023 //LightLevel Display 00024 _lcd.display("L: ",LINE1+9); 00025 _lcd.display(_lightLevel); 00026 00027 //Pressure Display 00028 _lcd.display("P: ",LINE2+2); 00029 _lcd.display(_pressure); 00030 _lcd.display(" mbar"); 00031 _lcd.enableCursor(); 00032 } 00033 00034 void Display::pageTwo() 00035 { 00036 _lcd.clear(); 00037 // _lcd.enableCursor(); 00038 00039 _lcd.display("01/01/2018 00:00",LINE1); 00040 _lcd.display("dd/mm/yyyy hh:mm",LINE2); 00041 00042 _lcd.pos(LINE1); 00043 } 00044 00045 /*void Display::day10() 00046 { 00047 00048 } 00049 00050 void Display::day1() 00051 { 00052 00053 } 00054 00055 void Display::month10() 00056 { 00057 00058 } 00059 00060 void Display::month1() 00061 { 00062 00063 } 00064 00065 void Display::year1000() 00066 { 00067 00068 } 00069 00070 void Display::year100() 00071 { 00072 00073 } 00074 00075 void Display::year10() 00076 { 00077 00078 } 00079 00080 void Display::year1() 00081 { 00082 00083 } 00084 00085 void Display::hour10() 00086 { 00087 00088 } 00089 00090 void Display::hour1() 00091 { 00092 00093 } 00094 00095 void Display::minute10() 00096 { 00097 00098 } 00099 00100 void Display::minute1() 00101 { 00102 00103 }*/ 00104 00105 00106 void Display::setTemperature(S_BYTE temp) 00107 { 00108 sprintf(_temperature,"%d",temp); 00109 } 00110 00111 void Display::setLightLevel(U_BYTE light) 00112 { 00113 sprintf(_lightLevel,"%u",light); 00114 } 00115 00116 void Display::setPressure(U_BYTE pres) 00117 { 00118 sprintf(_pressure,"%u",pres); 00119 } 00120 00121 void Display::clear() 00122 { 00123 00124 }
Generated on Fri Jul 15 2022 05:30:30 by 1.7.2