Make Gcode from .txt data. It is 2D array, for Robot Path.
Dependents: WRS_mechanamu_test WRS2019_master
MakeSequencer.h@5:9b4fcc87af6a, 2018-10-17 (annotated)
- Committer:
- satoyuki1111
- Date:
- Wed Oct 17 09:11:24 2018 +0000
- Revision:
- 5:9b4fcc87af6a
- Parent:
- 4:1e606e2301f9
- Child:
- 6:e513810fc3a6
The first commit.; this program is improvement edition of Make Sequencer and Make Sequencer 2.; So,I want to use this program.; Solves arrays bug(Dynamic allocation,Initialize,release)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
satoyuki1111 | 0:359eba7592ca | 1 | #ifndef MAKESEQ_H |
satoyuki1111 | 0:359eba7592ca | 2 | #define MAKESEQ_H |
satoyuki1111 | 0:359eba7592ca | 3 | |
satoyuki1111 | 0:359eba7592ca | 4 | #include "mbed.h" |
satoyuki1111 | 0:359eba7592ca | 5 | #include "string" |
satoyuki1111 | 4:1e606e2301f9 | 6 | #define CODE_LENGTH 15 |
satoyuki1111 | 5:9b4fcc87af6a | 7 | #define ARRAY_EREMENT 6 |
satoyuki1111 | 4:1e606e2301f9 | 8 | #define BUF 256 |
satoyuki1111 | 2:4fc4593498d7 | 9 | |
satoyuki1111 | 0:359eba7592ca | 10 | |
satoyuki1111 | 0:359eba7592ca | 11 | class MakeSequencer |
satoyuki1111 | 0:359eba7592ca | 12 | { |
satoyuki1111 | 0:359eba7592ca | 13 | public: |
satoyuki1111 | 0:359eba7592ca | 14 | MakeSequencer(FILE *fp); |
satoyuki1111 | 0:359eba7592ca | 15 | bool FileOpen(); |
satoyuki1111 | 4:1e606e2301f9 | 16 | void getGcode(int row,int aSize,int* array); |
satoyuki1111 | 4:1e606e2301f9 | 17 | int getGcodeSize(); |
satoyuki1111 | 0:359eba7592ca | 18 | bool ReadGcode(); |
satoyuki1111 | 0:359eba7592ca | 19 | |
satoyuki1111 | 4:1e606e2301f9 | 20 | private: |
satoyuki1111 | 2:4fc4593498d7 | 21 | int _data[ARRAY_EREMENT][CODE_LENGTH]; |
satoyuki1111 | 2:4fc4593498d7 | 22 | int _codesize; |
satoyuki1111 | 3:09ee560a3007 | 23 | int _ele; |
satoyuki1111 | 3:09ee560a3007 | 24 | int _count; |
satoyuki1111 | 0:359eba7592ca | 25 | LocalFileSystem *_local; |
satoyuki1111 | 0:359eba7592ca | 26 | FILE *_fp; |
satoyuki1111 | 0:359eba7592ca | 27 | }; |
satoyuki1111 | 0:359eba7592ca | 28 | |
satoyuki1111 | 0:359eba7592ca | 29 | #endif |