void example() { A a; B b; cout << b.getValue(a) << endl; cout << getAValue(a) << endl; }
void loop() { background(0,0,0); //blank the screen black //labels text("meter demo (work in progress disregard any readings!)", 0, 5); text(" temperature 1: ", 18, 58); text(" temperature 2: ", 18, 78); text(" boost pressure: ", 18, 18); text("oil temperature: ", 18, 38); text("accelerometer x: ", 18, 98); while (!(touch_get_cursor(&m_point))){ Serial.print('F'); //request for data block temp1 = getAValue(); temp2 = getAValue(); boost = getAValue(); oilT = getAValue(); Serial.print('X'); //request a data block accelx = getAValue(); //display data here text((float)temp1, 120, 58); text((float)temp2, 120, 78); text((float)boost, 120, 18); text((float)oilT, 120, 38); text((float)accelx, 120, 98); delay(100); //delay so things are readable } while (touch_get_cursor(&m_point)){} background(0,0,0); bmp_draw("mockbig",0,0); //wait until screen is touched while(!touch_get_cursor(&m_point)){} while(touch_get_cursor(&m_point)){} }