Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos MLX90614
Measure.h
00001 #include "Item.h" 00002 00003 #define SELECTION_LINE 6 00004 00005 class Measure: public Item { 00006 public: 00007 //constructor for thermometer 00008 Measure(char * title, ST7565 *lcd, Item *back, DigitalOut *laser){ 00009 this->title = title; 00010 this->st7565 = lcd; 00011 this->back = back; 00012 backName = " Back"; 00013 hasResult = false; 00014 selected = 1; 00015 current_line = 6; 00016 isOn = false; 00017 this->laser = laser; 00018 }; 00019 00020 //Measure(char *title, ST7565, *lcd, Item *back, DigitalOut *laser); 00021 //Measure(char * title, ST7565 *lcd, Item *back); 00022 //constructor for thermometer 00023 //Measure(char *title, ST7565 *lcd, Item *back, DigitalOut *gyro, DigitalOut *thermo); 00024 Measure(); 00025 00026 //inherited functions 00027 virtual void display(); 00028 virtual void update(char c); 00029 00030 //set next screen 00031 void setNext(char * t, Item *item){ 00032 this->nextName = t; 00033 this->next = item; 00034 } 00035 00036 //set description of screen 00037 void setDescription(char * description){ 00038 this->description = description; 00039 } 00040 00041 //function to set screen as result screen 00042 void setResult(bool r){ 00043 hasResult = r; 00044 } 00045 00046 private: 00047 //digital outputs for controlling stuff 00048 DigitalOut *laser; 00049 00050 //menu items - only 2 -> start and back 00051 Item **items[2]; 00052 Item *next; //screen to go next 00053 00054 00055 bool hasResult, isOn; 00056 00057 int selected, current_line; 00058 char * description, *nextName, *backName; 00059 void display_description(char *r); 00060 void set_selected(int s); 00061 void display_result(double result); 00062 void display_items(void); 00063 };
Generated on Thu Jul 14 2022 11:25:13 by
1.7.2