Commit 54ff94bf authored by koennecke's avatar koennecke
Browse files

Fixed the MPA protocol driver with real data; different file names for each

save are needed as MPA does not overwrite and Masako wants the data
parent 54bc47bd
......@@ -18,7 +18,7 @@
* - q:mpa sends MPA? to the device and reads a fixed number of lines as
* a response. This is the status request. The contained On/Off is used to
* update the status. The remainder is stored as text in an mpa node.
* - q:getdata does the sequence of mpafile=fname, mpasave and sendfile. The
* - q:getdata:mpafilename does the sequence of mpafile=fname, mpasave and sendfile. The
* response is analyzed: the TDAT1 stuff is taken as data. The rest is put
* into a node called sfile.
......@@ -43,7 +43,7 @@ typedef struct {
static int MPAProtHandler(Ascon *a)
char *writeData, *readData, *pPtr;
char *writeData, *readData, *pPtr, *pTmp;
pMPA mpa;
int ret;
......@@ -67,7 +67,12 @@ static int MPAProtHandler(Ascon *a)
mpa->mode = SNDFILE;
a->wrPos = 0;
a->lineCount = 1;
DynStringCopy(a->wrBuffer,"sendfile sics.mpa\r\n");
pPtr = writeData + strlen("q:getdata:");
pTmp = strdup(pPtr);
DynStringCopy(a->wrBuffer,"sendfile ");
a->state = AsconWriting;
return 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment