Release candidate version. The pointer in GAS Pressure display is changed to a triangle.

Dependencies:   UniGraphic mbed vt100

Please note, at 2-Mar-2018 the current version of mbed-lib has a defect in Ticker.
https://os.mbed.com/forum/bugs-suggestions/topic/29287/

So, mbed lib version 157 is intentionally being used.
Please do not update mbed library until the problem in the above URL is fixed.

In this version, format of GAS Pressure Display has been changed.
/media/uploads/Rhyme/low.jpg

/media/uploads/Rhyme/good.jpg

/media/uploads/Rhyme/high.jpg

moto

Committer:
Rhyme
Date:
Fri Mar 02 07:56:09 2018 +0000
Revision:
0:774324cbc5a6
Release candidate version. GAS Pressure pointer is now a triangle.; Some source file clean-up was done.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:774324cbc5a6 1 #include "mbed.h"
Rhyme 0:774324cbc5a6 2 #include "edge_mgr.h"
Rhyme 0:774324cbc5a6 3 #include "edge_reset_mgr.h"
Rhyme 0:774324cbc5a6 4 #include "edge_chart.h"
Rhyme 0:774324cbc5a6 5 #if 0
Rhyme 0:774324cbc5a6 6 typedef struct _edge_chart_st {
Rhyme 0:774324cbc5a6 7 char *name ;
Rhyme 0:774324cbc5a6 8 int left ;
Rhyme 0:774324cbc5a6 9 int top ;
Rhyme 0:774324cbc5a6 10 int width ;
Rhyme 0:774324cbc5a6 11 int height ;
Rhyme 0:774324cbc5a6 12 int index ;
Rhyme 0:774324cbc5a6 13 int min ;
Rhyme 0:774324cbc5a6 14 int max ;
Rhyme 0:774324cbc5a6 15 } edge_chart_type ;
Rhyme 0:774324cbc5a6 16
Rhyme 0:774324cbc5a6 17 extern edge_chart_type edge_chart[] ;
Rhyme 0:774324cbc5a6 18 #endif
Rhyme 0:774324cbc5a6 19
Rhyme 0:774324cbc5a6 20 edge_chart_type edge_chart[] = {
Rhyme 0:774324cbc5a6 21 /* name, left, top, width, height, index, min, max */
Rhyme 0:774324cbc5a6 22 { "Accel", 0, 0, 160, 60, 0, -0.2, 0.2 },
Rhyme 0:774324cbc5a6 23 { "Color", 160, 0, 160, 120, 0, 0.0, 10000.0 },
Rhyme 0:774324cbc5a6 24 { "Color2", 160, 120, 160, 120, 0, 0.0, 10000.0 },
Rhyme 0:774324cbc5a6 25 { "Temp", 0, 120, 160, 120, 0, -10.0, 50.0 },
Rhyme 0:774324cbc5a6 26 { "Press", 0, 60, 160, 60, 0, -1.0, 5.0 },
Rhyme 0:774324cbc5a6 27 { 0, 0, 0, 0, 0, 0, 0.0, 0.0 }
Rhyme 0:774324cbc5a6 28 } ;
Rhyme 0:774324cbc5a6 29
Rhyme 0:774324cbc5a6 30 void draw_chart_frame(edge_chart_type *p)
Rhyme 0:774324cbc5a6 31 {
Rhyme 0:774324cbc5a6 32 if (display) {
Rhyme 0:774324cbc5a6 33 display->fillrect(p->left+1, p->top+1,
Rhyme 0:774324cbc5a6 34 p->left + p->width - 2, p->top + p->height - 2, Black) ;
Rhyme 0:774324cbc5a6 35 display->rect(p->left, p->top,
Rhyme 0:774324cbc5a6 36 p->left + p->width - 1,
Rhyme 0:774324cbc5a6 37 p->top + p->height -1, Blue) ;
Rhyme 0:774324cbc5a6 38 display->set_font((unsigned char*) Arial12x12);
Rhyme 0:774324cbc5a6 39 display->foreground(White) ;
Rhyme 0:774324cbc5a6 40 display->locate(p->left + 5, p->top + 5) ;
Rhyme 0:774324cbc5a6 41 display->printf(p->name) ;
Rhyme 0:774324cbc5a6 42 }
Rhyme 0:774324cbc5a6 43 }
Rhyme 0:774324cbc5a6 44
Rhyme 0:774324cbc5a6 45 void draw_all_chart_frame(void)
Rhyme 0:774324cbc5a6 46 {
Rhyme 0:774324cbc5a6 47 edge_chart_type *p ;
Rhyme 0:774324cbc5a6 48 if (display) {
Rhyme 0:774324cbc5a6 49 reset_watch_dog() ;
Rhyme 0:774324cbc5a6 50 display->BusEnable(true) ;
Rhyme 0:774324cbc5a6 51 for(p = edge_chart ; p->name ; p++ ) {
Rhyme 0:774324cbc5a6 52 draw_chart_frame(p) ;
Rhyme 0:774324cbc5a6 53 }
Rhyme 0:774324cbc5a6 54 display->BusEnable(false) ;
Rhyme 0:774324cbc5a6 55 }
Rhyme 0:774324cbc5a6 56 }