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.
moto
afLib/StatusCommand.h@0:774324cbc5a6, 2018-03-02 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rhyme | 0:774324cbc5a6 | 1 | /** |
Rhyme | 0:774324cbc5a6 | 2 | * Copyright 2015 Afero, Inc. |
Rhyme | 0:774324cbc5a6 | 3 | * |
Rhyme | 0:774324cbc5a6 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Rhyme | 0:774324cbc5a6 | 5 | * you may not use this file except in compliance with the License. |
Rhyme | 0:774324cbc5a6 | 6 | * You may obtain a copy of the License at |
Rhyme | 0:774324cbc5a6 | 7 | * |
Rhyme | 0:774324cbc5a6 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Rhyme | 0:774324cbc5a6 | 9 | * |
Rhyme | 0:774324cbc5a6 | 10 | * Unless required by applicable law or agreed to in writing, software |
Rhyme | 0:774324cbc5a6 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Rhyme | 0:774324cbc5a6 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Rhyme | 0:774324cbc5a6 | 13 | * See the License for the specific language governing permissions and |
Rhyme | 0:774324cbc5a6 | 14 | * limitations under the License. |
Rhyme | 0:774324cbc5a6 | 15 | */ |
Rhyme | 0:774324cbc5a6 | 16 | |
Rhyme | 0:774324cbc5a6 | 17 | #ifndef STATUS_COMMAND_H__ |
Rhyme | 0:774324cbc5a6 | 18 | #define STATUS_COMMAND_H__ |
Rhyme | 0:774324cbc5a6 | 19 | |
Rhyme | 0:774324cbc5a6 | 20 | #include "mbed.h" |
Rhyme | 0:774324cbc5a6 | 21 | |
Rhyme | 0:774324cbc5a6 | 22 | class StatusCommand { |
Rhyme | 0:774324cbc5a6 | 23 | public: |
Rhyme | 0:774324cbc5a6 | 24 | |
Rhyme | 0:774324cbc5a6 | 25 | StatusCommand(); |
Rhyme | 0:774324cbc5a6 | 26 | |
Rhyme | 0:774324cbc5a6 | 27 | StatusCommand(uint16_t bytesToSend); |
Rhyme | 0:774324cbc5a6 | 28 | |
Rhyme | 0:774324cbc5a6 | 29 | ~StatusCommand(); |
Rhyme | 0:774324cbc5a6 | 30 | |
Rhyme | 0:774324cbc5a6 | 31 | uint16_t getSize(); |
Rhyme | 0:774324cbc5a6 | 32 | |
Rhyme | 0:774324cbc5a6 | 33 | uint16_t getBytes(int *bytes); |
Rhyme | 0:774324cbc5a6 | 34 | |
Rhyme | 0:774324cbc5a6 | 35 | uint8_t calcChecksum(); |
Rhyme | 0:774324cbc5a6 | 36 | |
Rhyme | 0:774324cbc5a6 | 37 | void setChecksum(uint8_t checksum); |
Rhyme | 0:774324cbc5a6 | 38 | |
Rhyme | 0:774324cbc5a6 | 39 | uint8_t getChecksum(); |
Rhyme | 0:774324cbc5a6 | 40 | |
Rhyme | 0:774324cbc5a6 | 41 | void setAck(bool ack); |
Rhyme | 0:774324cbc5a6 | 42 | |
Rhyme | 0:774324cbc5a6 | 43 | void setBytesToSend(uint16_t bytesToSend); |
Rhyme | 0:774324cbc5a6 | 44 | |
Rhyme | 0:774324cbc5a6 | 45 | uint16_t getBytesToSend(); |
Rhyme | 0:774324cbc5a6 | 46 | |
Rhyme | 0:774324cbc5a6 | 47 | void setBytesToRecv(uint16_t bytesToRecv); |
Rhyme | 0:774324cbc5a6 | 48 | |
Rhyme | 0:774324cbc5a6 | 49 | uint16_t getBytesToRecv(); |
Rhyme | 0:774324cbc5a6 | 50 | |
Rhyme | 0:774324cbc5a6 | 51 | bool equals(StatusCommand *statusCommand); |
Rhyme | 0:774324cbc5a6 | 52 | |
Rhyme | 0:774324cbc5a6 | 53 | bool isValid(); |
Rhyme | 0:774324cbc5a6 | 54 | |
Rhyme | 0:774324cbc5a6 | 55 | void dump(); |
Rhyme | 0:774324cbc5a6 | 56 | |
Rhyme | 0:774324cbc5a6 | 57 | void dumpBytes(); |
Rhyme | 0:774324cbc5a6 | 58 | |
Rhyme | 0:774324cbc5a6 | 59 | private: |
Rhyme | 0:774324cbc5a6 | 60 | |
Rhyme | 0:774324cbc5a6 | 61 | uint8_t _cmd; |
Rhyme | 0:774324cbc5a6 | 62 | uint16_t _bytesToSend; |
Rhyme | 0:774324cbc5a6 | 63 | uint16_t _bytesToRecv; |
Rhyme | 0:774324cbc5a6 | 64 | uint8_t _checksum; |
Rhyme | 0:774324cbc5a6 | 65 | }; |
Rhyme | 0:774324cbc5a6 | 66 | |
Rhyme | 0:774324cbc5a6 | 67 | #endif // STATUS_COMMAND_H__ |