Ok,
I've taken a step back to evaluate the situation properly, rushing last night and it was too late following a long day.
I have done this and cond works, minus init error checking
/////////////////////////////////////////////////////////
// Atlas Sensors Functions
/////////////////////////////////////////////////////////
boolean initAtlas(AtlasSensorDef_t &data)
{
char responsechars[15];
responsechars[0]=0;
data.saddr.begin(38400);
for (int i=0;i<255,strlen(responsechars)==0;i++)
{
#if defined(_COND)
// if (data.type==_cond) //set conductivity stamp to return SG only, K=1.0
data.saddr.print("response,0\rk,10\rc,0\ro,tds,0\ro,sg,0\ro,ec,0\ro,s,1\rr\r");
#else
#endif
// else
{
#if defined _PH_EZO
if (data.type==_ph)
{
data.saddr.print("response,0\rc,0\rr\r");
}
else
#endif
data.saddr.print("e\rr\r");
}
#if defined(_PHEZO) || defined(_COND)
delay(1000);
#else
delay(384);
#endif
data.average=0;
getresponse(data, responsechars);
}
// if (strlen(responsechars)==0)
// {
// data.initialized=false;
// return false;
// }
// data.value=atof(responsechars);
// if (data.value>0)
{
data.isReady=true;
data.initialized=true;
updateAtlas(data);
data.isReady=false;
}
// else
// return false;
return true;
}
M