Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

radioButton_checked

Mammad900 edited this page Feb 28, 2021 · 1 revision

radioButton_checked[page][index]

Summary

Returns true if a radio-button is selected.

Note that there can't be more than one selected radio-button per group.

Parameters

  1. Page (int) : The page which contains the radio-button
  2. Index (int) : The index of the radio-button in the page

Returns

true if the radio-button was checked, false if it was not.

Example

#define PAGE_SETTINGS 3
void outputData (String data) {
    if(radioButton_checked[PAGE_SETTINGS][0]){ // Serial 0
        Serial.println(data);
    }
    else if(radioButton_checked[PAGE_SETTINGS][1]){ // Serial 1
        Serial1.println(data);
    }
    else if(radioButton_checked[PAGE_SETTINGS][2]){ // Serial 2
        Serial1.println(data);
    }
    else if(radioButton_checked[PAGE_SETTINGS][3]){ // Serial 3
        Serial1.println(data);
    }
    #ifdef __SAM3X8E__
    else if(radioButton_checked[PAGE_SETTINGS][4]){ // Native USB port serial
        SerialUSB.println(data);
    }
    #endif
}
Clone this wiki locally