int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog time configClocks(); configPins(); configTimerA0(); configTimerA1(); configADC10(); initSPI(); initMessage(); _enable_interrupts(); // enable global interrupts while (1) { //pack our new message GPIOUpdate(); currentUpdate(); messagePackServoValues(servoValue); } }
void ModelEdit::refreshUpdates() { UpdateDefn* oldUpdate = currentUpdate(); QListViewItem* current = NULL; _updates->clear(); for (unsigned int i = 0; i < _curr.updates.size(); ++i) { const UpdateDefn& update = _curr.updates[i]; ListViewItem* lvi = new ListViewItem(_updates); lvi->setValue(0, update.number); lvi->setValue(1, update.description); if (oldUpdate != NULL && update.number == oldUpdate->number) current = lvi; } if (current == NULL) current = _updates->firstChild(); _updates->setCurrentItem(current); _updates->setSelected(current, true); }