Merge pull request #1582 from Samuelrmlink/PPSctrl
Added VPDO option for disabling PPS/EPR PDOs.
This commit is contained in:
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": "Aktiviert BLE"
|
"description": "Aktiviert BLE"
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": "Enables BLE"
|
"description": "Enables BLE"
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Activado",
|
"displayText": "BLE\n Activado",
|
||||||
"description": "Habilita BLE"
|
"description": "Habilita BLE"
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Activé",
|
"displayText": "BLE\n Activé",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "Abilita\nBluetooth LE",
|
"displayText": "Abilita\nBluetooth LE",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE Enabled",
|
"displayText": "BLE Enabled",
|
||||||
"description": "Enables BLE"
|
"description": "Enables BLE"
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE\n Enabled",
|
"displayText": "BLE\n Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE Enabled",
|
"displayText": "BLE Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE Enabled",
|
"displayText": "BLE Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,10 @@
|
|||||||
"BLEEnabled": {
|
"BLEEnabled": {
|
||||||
"displayText": "BLE Enabled",
|
"displayText": "BLE Enabled",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"PDVpdoEnabled": {
|
||||||
|
"displayText": "PD VPDO\nEnabled",
|
||||||
|
"description": "Enables PPS/EPR modes."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -402,6 +402,12 @@
|
|||||||
"maxLen": 7,
|
"maxLen": 7,
|
||||||
"maxLen2": 15,
|
"maxLen2": 15,
|
||||||
"description": "Should BLE be enabled at boot time."
|
"description": "Should BLE be enabled at boot time."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "PDVpdoEnabled",
|
||||||
|
"maxLen": 7,
|
||||||
|
"maxLen2": 15,
|
||||||
|
"description": "Enabled PPS/EPR modes."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -88,5 +88,6 @@
|
|||||||
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_35 BT_UUID_DECLARE_16(35)
|
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_35 BT_UUID_DECLARE_16(35)
|
||||||
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_36 BT_UUID_DECLARE_16(36)
|
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_36 BT_UUID_DECLARE_16(36)
|
||||||
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_37 BT_UUID_DECLARE_16(37)
|
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_37 BT_UUID_DECLARE_16(37)
|
||||||
|
#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_38 BT_UUID_DECLARE_16(37)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -243,6 +243,8 @@ static struct bt_gatt_attr attrs[] = {
|
|||||||
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
||||||
BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_SETTINGS_VALUE_37, BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
|
BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_SETTINGS_VALUE_37, BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
|
||||||
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
||||||
|
BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_SETTINGS_VALUE_38, BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
|
||||||
|
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
||||||
BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_SETTINGS_VALUE_SAVE, BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
|
BT_GATT_CHARACTERISTIC(BT_UUID_CHAR_BLE_SETTINGS_VALUE_SAVE, BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE,
|
||||||
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL),
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && (((lastCapabilities[i] & PD_APDO_TYPE) == PD_APDO_TYPE_PPS))) {
|
} else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && (((lastCapabilities[i] & PD_APDO_TYPE) == PD_APDO_TYPE_PPS)) && getSettingValue(SettingsOptions::PDVpdoEnabled)) {
|
||||||
// If this is a PPS slot, calculate the max voltage in the PPS range that can we be used and maintain
|
// If this is a PPS slot, calculate the max voltage in the PPS range that can we be used and maintain
|
||||||
uint16_t max_voltage = PD_PAV2MV(PD_APDO_PPS_MAX_VOLTAGE_GET(lastCapabilities[i]));
|
uint16_t max_voltage = PD_PAV2MV(PD_APDO_PPS_MAX_VOLTAGE_GET(lastCapabilities[i]));
|
||||||
// uint16_t min_voltage = PD_PAV2MV(PD_APDO_PPS_MIN_VOLTAGE_GET(lastCapabilities[i]));
|
// uint16_t min_voltage = PD_PAV2MV(PD_APDO_PPS_MIN_VOLTAGE_GET(lastCapabilities[i]));
|
||||||
@@ -179,7 +179,7 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef POW_EPR
|
#ifdef POW_EPR
|
||||||
else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && (((lastCapabilities[i] & PD_APDO_TYPE) == PD_APDO_TYPE_AVS))) {
|
else if ((lastCapabilities[i] & PD_PDO_TYPE) == PD_PDO_TYPE_AUGMENTED && (((lastCapabilities[i] & PD_APDO_TYPE) == PD_APDO_TYPE_AVS)) && getSettingValue(SettingsOptions::PDVpdoEnabled)) {
|
||||||
uint16_t max_voltage = PD_PAV2MV(PD_APDO_AVS_MAX_VOLTAGE_GET(lastCapabilities[i]));
|
uint16_t max_voltage = PD_PAV2MV(PD_APDO_AVS_MAX_VOLTAGE_GET(lastCapabilities[i]));
|
||||||
uint8_t max_wattage = PD_APDO_AVS_MAX_POWER_GET(lastCapabilities[i]);
|
uint8_t max_wattage = PD_APDO_AVS_MAX_POWER_GET(lastCapabilities[i]);
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ enum SettingsOptions {
|
|||||||
LOGOTime = 35, // Duration the logo will be displayed for
|
LOGOTime = 35, // Duration the logo will be displayed for
|
||||||
CalibrateCJC = 36, // Toggle calibrate CJC at next boot
|
CalibrateCJC = 36, // Toggle calibrate CJC at next boot
|
||||||
BLEEnabled = 37, // Should BLE hardware be enabled if present
|
BLEEnabled = 37, // Should BLE hardware be enabled if present
|
||||||
|
PDVpdoEnabled = 38, // Should PPS/EPR be enabled
|
||||||
//
|
//
|
||||||
SettingsOptionsLength = 38, //
|
SettingsOptionsLength = 39, //
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ enum class SettingsItemIndex : uint8_t {
|
|||||||
SettingsReset,
|
SettingsReset,
|
||||||
LanguageSwitch,
|
LanguageSwitch,
|
||||||
BLEEnabled,
|
BLEEnabled,
|
||||||
|
PDVpdoEnabled,
|
||||||
NUM_ITEMS,
|
NUM_ITEMS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
|||||||
{0, 5, 1, 1}, // LOGOTime
|
{0, 5, 1, 1}, // LOGOTime
|
||||||
{0, 1, 1, 0}, // CalibrateCJC
|
{0, 1, 1, 0}, // CalibrateCJC
|
||||||
{0, 1, 1, 1}, // BLEEnabled
|
{0, 1, 1, 1}, // BLEEnabled
|
||||||
|
{0, 1, 1, 1}, // PDVpdoEnabled
|
||||||
};
|
};
|
||||||
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
|
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ static void displayQCInputV(void);
|
|||||||
#endif
|
#endif
|
||||||
#if POW_PD
|
#if POW_PD
|
||||||
static void displayPDNegTimeout(void);
|
static void displayPDNegTimeout(void);
|
||||||
|
static void displayPDVpdoEnabled(void);
|
||||||
#endif
|
#endif
|
||||||
static void displaySensitivity(void);
|
static void displaySensitivity(void);
|
||||||
static void displayShutdownTime(void);
|
static void displayShutdownTime(void);
|
||||||
@@ -179,6 +180,7 @@ const menuitem powerMenu[] = {
|
|||||||
#endif
|
#endif
|
||||||
#if POW_PD
|
#if POW_PD
|
||||||
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout, SettingsItemIndex::PDNegTimeout, 5}, /*PD timeout setup*/
|
{SETTINGS_DESC(SettingsItemIndex::PDNegTimeout), nullptr, displayPDNegTimeout, nullptr, SettingsOptions::PDNegTimeout, SettingsItemIndex::PDNegTimeout, 5}, /*PD timeout setup*/
|
||||||
|
{SETTINGS_DESC(SettingsItemIndex::PDVpdoEnabled), nullptr, displayPDVpdoEnabled, nullptr, SettingsOptions::PDVpdoEnabled, SettingsItemIndex::PDVpdoEnabled, 7 }, /*Toggle whether to use PPS/EPR*/
|
||||||
#endif
|
#endif
|
||||||
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} // end of menu marker. DO NOT REMOVE
|
{0, nullptr, nullptr, nullptr, SettingsOptions::SettingsOptionsLength, SettingsItemIndex::NUM_ITEMS, 0} // end of menu marker. DO NOT REMOVE
|
||||||
};
|
};
|
||||||
@@ -376,6 +378,7 @@ static void displayPDNegTimeout(void) {
|
|||||||
OLED::printNumber(value, 3, FontStyle::LARGE);
|
OLED::printNumber(value, 3, FontStyle::LARGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static void displayPDVpdoEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::PDVpdoEnabled)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool setBoostTemp(void) {
|
static bool setBoostTemp(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user