this ones has me stumped
struct StructBuff_t {
char GPS[100];
char imuRoll[6];
char imuPitch[6];
char imuYaw[6];
char UltS[3];
char SenBuffersAll[133];
}
StructBuff;
void BuildTransBuffer(){
// Struct your Buffers here
PString(StructBuff.GPS, sizeof(StructBuff.GPS), gps.sentence()); //+100 Buff
//----------------------Delimitor------------------------------------------
PString(StructBuff.imuRoll, sizeof(StructBuff.imuRoll), ToDeg(roll)); //+6 Buff
//----------------------Seperator------------------------------------------
PString(StructBuff.imuPitch, sizeof(StructBuff.imuPitch), ToDeg(pitch)); //+6 Buff
//----------------------Seperator------------------------------------------
PString(StructBuff.imuYaw, sizeof(StructBuff.imuYaw), ToDeg(yaw)); //+6 Buff
//----------------------Delimitor------------------------------------------
PString(StructBuff.UltS, sizeof(StructBuff.UltS), averagePing()); //+3 Buff = 124
//----------------------Delimitor------------------------------------------
// 132 point buffer
String Prefix, Suffix, Seperator, Delimit, sGps, sRoll, sPitch, sYaw, sAP, SenBuff;
Prefix = String('<');
Suffix = String('>');
Seperator = String('^');
Delimit = String('|');
sGps = gps.sentence();
// sGps = String(gps.sentence());
sRoll = StructBuff.imuRoll;
// sRoll = String(StructBuff.imuRoll);
sPitch = StructBuff.imuPitch;
// sPitch = String(StructBuff.imuPitch);
sYaw = StructBuff.imuYaw;
// sYaw = String(StructBuff.imuYaw);
// sAP = averagePing(); //cant use unsigned int as char string
// sAP = String(averagePing());
SenBuff = String("");
//Start string append
SenBuff += Prefix; SenBuff += Prefix; SenBuff += Prefix; SenBuff += Delimit;
SenBuff += sGps; SenBuff += Delimit; SenBuff += sRoll; SenBuff += Seperator; SenBuff += sPitch;
SenBuff += Seperator; SenBuff += sYaw; SenBuff += Delimit; SenBuff += sAP; SenBuff += Delimit;
SenBuff += Suffix; SenBuff += Suffix; SenBuff += Suffix;
//End string append
PString(StructBuff.SenBuffersAll, sizeof(StructBuff.SenBuffersAll), SenBuff);
Serial.println(SenBuff);
}
SenBuff/StructBuff.SenBuffersAll
contence of SenBuff
<<<||0.00^0.00^0.00||>>>
<<<||0.00^0.00^0.00||>>>
i can see there filling with my Trigger and Delimit and Separators but i guess it's just not that simple to stuff function output into strings? LOL cant blame a guy for trying. ill keep tinkering while i wait for your advice and witty slice and dice i am sure you will use to render my code impotent. till then.
BTW thanks for all the help with this. i have been learning a lot i think