implemented button - #708

This commit is contained in:
proddy
2021-03-01 22:19:28 +01:00
parent 7521ce6ad3
commit 3eb8ac9194
9 changed files with 560 additions and 216 deletions

View File

@@ -117,6 +117,22 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
margin="normal"
/>
<br></br>
<Typography variant="h6" color="primary" >
External Button
</Typography>
<TextValidator
validators={['required', 'isNumber', 'minNumber:0', 'maxNumber:40']}
errorMessages={['Button GPIO is required', "Must be a number", "Must be 0 or higher", "Max value is 40"]}
name="pbutton_gpio"
label="Button GPIO pin (0=none)"
fullWidth
variant="outlined"
value={data.pbutton_gpio}
type="number"
onChange={handleValueChange('pbutton_gpio')}
margin="normal"
/>
<br></br>
<Typography variant="h6" color="primary" >
Dallas Sensor
</Typography>

View File

@@ -17,6 +17,7 @@ export interface EMSESPSettings {
hide_led: boolean;
api_enabled: boolean;
analog_enabled: boolean;
pbutton_gpio: number;
trace_raw: boolean;
}