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 "string.h"
Rhyme 0:774324cbc5a6 3 #include "vt100.h"
Rhyme 0:774324cbc5a6 4 #include "edge_time.h"
Rhyme 0:774324cbc5a6 5 #include "edge_pin.h"
Rhyme 0:774324cbc5a6 6 #include "edge_reset_mgr.h"
Rhyme 0:774324cbc5a6 7 #include "afLib.h"
Rhyme 0:774324cbc5a6 8 #include "pending.h"
Rhyme 0:774324cbc5a6 9 #include "msg_types.h"
Rhyme 0:774324cbc5a6 10 #include "mbedSPI.h"
Rhyme 0:774324cbc5a6 11 #include "af_mgr.h"
Rhyme 0:774324cbc5a6 12
Rhyme 0:774324cbc5a6 13 afLib *afero = 0 ;
Rhyme 0:774324cbc5a6 14 pending_class *pending = 0 ;
Rhyme 0:774324cbc5a6 15 InterruptIn *afero_int = 0 ;
Rhyme 0:774324cbc5a6 16 mbedSPI *afero_spi = 0 ;
Rhyme 0:774324cbc5a6 17 DigitalOut *afero_reset ;
Rhyme 0:774324cbc5a6 18 bool gLinked = false ;
Rhyme 0:774324cbc5a6 19 bool gConnected = false ;
Rhyme 0:774324cbc5a6 20
Rhyme 0:774324cbc5a6 21 void afero_isr(void)
Rhyme 0:774324cbc5a6 22 {
Rhyme 0:774324cbc5a6 23 afero->mcuISR() ;
Rhyme 0:774324cbc5a6 24 }
Rhyme 0:774324cbc5a6 25
Rhyme 0:774324cbc5a6 26 void init_aflib(void)
Rhyme 0:774324cbc5a6 27 {
Rhyme 0:774324cbc5a6 28 afero_reset = new DigitalOut(PIN_ASR_RESET, 1) ; /* create as deasserted */
Rhyme 0:774324cbc5a6 29 afero_spi = new mbedSPI(PIN_MOSI, PIN_MISO, PIN_SCK, PIN_CS) ;
Rhyme 0:774324cbc5a6 30
Rhyme 0:774324cbc5a6 31 reset_watch_dog() ;
Rhyme 0:774324cbc5a6 32 afero = new afLib(
Rhyme 0:774324cbc5a6 33 PIN_INTR,
Rhyme 0:774324cbc5a6 34 afero_isr,
Rhyme 0:774324cbc5a6 35 attributeChangeRequest,
Rhyme 0:774324cbc5a6 36 attributeUpdatedReport,
Rhyme 0:774324cbc5a6 37 afero_spi ) ;
Rhyme 0:774324cbc5a6 38 reset_watch_dog() ;
Rhyme 0:774324cbc5a6 39 wait(0.1) ;
Rhyme 0:774324cbc5a6 40 *afero_reset = 0 ;
Rhyme 0:774324cbc5a6 41 wait(0.5) ; /* required 250ms ~ time for reset */
Rhyme 0:774324cbc5a6 42 *afero_reset = 1 ;
Rhyme 0:774324cbc5a6 43 reset_watch_dog() ;
Rhyme 0:774324cbc5a6 44 wait(0.5) ;
Rhyme 0:774324cbc5a6 45 reset_watch_dog() ;
Rhyme 0:774324cbc5a6 46 }