//#include "tinsel.h" #include typedef struct cell_state_t { // Line 82 float t = 0.0;// Our temperature uint32_t updated = 0; uint32_t fin = 0;// Finished Flag uint32_t finSent = 0;// Finished Sent Flag uint32_t finIdx = 0;// Finished Index float tFixed = 0.0; float tData[4][2] = {{0.0,0.0},{0.0,0.0},{0.0,0.0},{0.0,0.0}}; uint32_t stepRX[2] = {0,0};// Bitmask for the inputs we have received each step uint32_t connected = 0;// Bitmask of connected pins, populated in Init uint32_t activeCount = 4;// Convenience value for number of connected devices to save recalcs uint32_t iter = 0;// Our iteration count uint32_t idleCnt = 0; } devtyp_cell_state_t; void Update(devtyp_cell_state_t* a, devtyp_cell_state_t* b) { a->t = b->t; a->updated = b->updated; a->fin = b->fin; a->finSent = b->finSent; a->finIdx = b->finIdx; a->tFixed = b->tFixed; a->connected = b->connected; a->activeCount = b->activeCount; a->iter = b->iter; a->idleCnt = b->idleCnt; a->stepRX[0] = b->stepRX[0]; a->stepRX[1] = b->stepRX[1]; for(int i = 0; i<4; i++) { a->tData[i][0] = b->tData[i][0]; a->tData[i][1] = b->tData[i][1]; } } int main(int argc, char** argv) { devtyp_cell_state_t tester = {10.0f, 1, 2, 3, 4, 5.0f, {{1.0f,2.0f},{3.0f,4.0f},{5.0f,6.0f},{7.0f,8.0f}}, {9, 10}, 6, 7, 8, 9}; devtyp_cell_state_t tester2, tester3; Update(&tester2, &tester); //tester.t = 15.0f; //tester.updated = 111; //tester.tFixed = 150.0f; //Update(&tester3, &tester); (void)tester; return 0; }