LCD implementation of our project.

Dependencies:   mbed mbed-rtos MLX90614

Committer:
ovidiup13
Date:
Sun Apr 26 16:29:53 2015 +0000
Revision:
3:688b62ff6474
Child:
5:5b1a8ad6c187
added screens for interacting with other components. i.e. distance, thermo, gyro, compass, etc. Need to complete settings screen and create threads for interacting with other code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ovidiup13 3:688b62ff6474 1 #include "LevelMeter.h"
ovidiup13 3:688b62ff6474 2
ovidiup13 3:688b62ff6474 3 void LevelMeter::display(void){
ovidiup13 3:688b62ff6474 4 draw_circles(0,0);
ovidiup13 3:688b62ff6474 5 }
ovidiup13 3:688b62ff6474 6
ovidiup13 3:688b62ff6474 7 void LevelMeter::update(char c){
ovidiup13 3:688b62ff6474 8 if(c == 'y')
ovidiup13 3:688b62ff6474 9 this->setSelectedScreen(back);
ovidiup13 3:688b62ff6474 10 }
ovidiup13 3:688b62ff6474 11
ovidiup13 3:688b62ff6474 12 void LevelMeter::draw_circles(double rX, double rY){
ovidiup13 3:688b62ff6474 13
ovidiup13 3:688b62ff6474 14 int X1 = 95, Y1 = 35, X2 = 30, Y2 = 35; //need to calculate these
ovidiup13 3:688b62ff6474 15
ovidiup13 3:688b62ff6474 16 //draw the circles
ovidiup13 3:688b62ff6474 17 st7565->fillcircle(X1, Y1, RADIUS_lvl, 20);
ovidiup13 3:688b62ff6474 18 st7565->drawcircle(X2, Y2, RADIUS_lvl, 1);
ovidiup13 3:688b62ff6474 19
ovidiup13 3:688b62ff6474 20 //draw cross
ovidiup13 3:688b62ff6474 21 st7565->drawline(X0 - 2, Y0, X0 + 2, Y0, 20);
ovidiup13 3:688b62ff6474 22 st7565->drawline(X0, Y0 - 2, X0, Y0 + 2, 20);
ovidiup13 3:688b62ff6474 23
ovidiup13 3:688b62ff6474 24 st7565->display();
ovidiup13 3:688b62ff6474 25 }