Plymouth ELEC351 Group T
/
ELEC351_Group_T
FINAL PROJECT isn't it
Fork of ELEC351 by
SERIAL.cpp@52:99915f5240b2, 2018-01-09 (annotated)
- Committer:
- thomasmorris
- Date:
- Tue Jan 09 22:27:49 2018 +0000
- Revision:
- 52:99915f5240b2
- Parent:
- 48:244d6d81bb52
- Child:
- 53:71f59e195f06
ITS THE FINAL COMMIT MESSAGE DO DO DO DO DO
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 25:36699ed589ab | 1 | #include "SERIAL.hpp" |
thomasmorris | 52:99915f5240b2 | 2 | bool Decimal_Check(char Input[100]) //Check if there is a decimal within the Array |
thomasmorris | 47:6d128e500875 | 3 | { |
thomasmorris | 47:6d128e500875 | 4 | for(int x = 0; x < sizeof(Input); x++) |
thomasmorris | 47:6d128e500875 | 5 | { |
thomasmorris | 52:99915f5240b2 | 6 | if(Input[x] == '.'){return true;} //Return true if one is found |
thomasmorris | 47:6d128e500875 | 7 | } |
thomasmorris | 52:99915f5240b2 | 8 | return false; //Return false if one is not found |
thomasmorris | 47:6d128e500875 | 9 | } |
thomasmorris | 47:6d128e500875 | 10 | |
thomasmorris | 52:99915f5240b2 | 11 | int Decimal_Position(char Input[100]) //Check where the decimal is positioned |
thomasmorris | 47:6d128e500875 | 12 | { |
thomasmorris | 52:99915f5240b2 | 13 | for(int x = 0; x < sizeof(Input); x++) |
thomasmorris | 47:6d128e500875 | 14 | { |
thomasmorris | 52:99915f5240b2 | 15 | if(Input[x] == '.'){return x;} //Return the position x of the Decimal |
thomasmorris | 47:6d128e500875 | 16 | } |
thomasmorris | 47:6d128e500875 | 17 | return 0; |
thomasmorris | 25:36699ed589ab | 18 | } |