Reading G_code in Local File System and encoding int array. this program is improvement edition of Make Sequencer and Make Sequencer 2. So,I want to use this program. Sample Code including in this cpp file. Solves arrays bug(Dynamic allocation,Initialize,release...)

Fork of MakeSequencer by yuki sato

Committer:
satoyuki1111
Date:
Wed Oct 10 05:34:43 2018 +0000
Revision:
1:4ebb30d54be7
Parent:
0:359eba7592ca
Child:
2:4fc4593498d7
MakeSequencer v1.1

Who changed what in which revision?

UserRevisionLine numberNew 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 0:359eba7592ca 6 #define CODE_LENGTH 100
satoyuki1111 0:359eba7592ca 7 #define ARRAY_EREMENT 3
satoyuki1111 0:359eba7592ca 8
satoyuki1111 0:359eba7592ca 9 class MakeSequencer
satoyuki1111 0:359eba7592ca 10 {
satoyuki1111 0:359eba7592ca 11 public:
satoyuki1111 0:359eba7592ca 12 MakeSequencer(FILE *fp);
satoyuki1111 0:359eba7592ca 13
satoyuki1111 0:359eba7592ca 14 bool inherit(int _rows,int _columns,int _data[][CODE_LENGTH]);
satoyuki1111 0:359eba7592ca 15 bool FileOpen();
satoyuki1111 0:359eba7592ca 16 void getGcode(int _seq,int* _array);
satoyuki1111 0:359eba7592ca 17 bool ReadGcode();
satoyuki1111 1:4ebb30d54be7 18 int getGcodeSize();
satoyuki1111 0:359eba7592ca 19
satoyuki1111 0:359eba7592ca 20 private:
satoyuki1111 0:359eba7592ca 21 char buf[256];
satoyuki1111 0:359eba7592ca 22 string code[1][CODE_LENGTH];
satoyuki1111 0:359eba7592ca 23 int data[ARRAY_EREMENT][CODE_LENGTH];
satoyuki1111 0:359eba7592ca 24 bool find[ARRAY_EREMENT];
satoyuki1111 1:4ebb30d54be7 25 int codesize;
satoyuki1111 0:359eba7592ca 26 LocalFileSystem *_local;
satoyuki1111 0:359eba7592ca 27 FILE *_fp;
satoyuki1111 0:359eba7592ca 28 };
satoyuki1111 0:359eba7592ca 29
satoyuki1111 0:359eba7592ca 30 #endif