From 9892dd0423b20e953c57e2cb10eef618ab98b500 Mon Sep 17 00:00:00 2001 From: Samuel Hedrick Date: Sun, 19 Feb 2023 14:13:50 -0600 Subject: [PATCH 1/5] Added VPDO option for disabling PPS/EPR PDOs. --- Translations/translation_EN.json | 6 +++++- Translations/translations_definitions.json | 10 ++++++++-- source/Core/Drivers/USBPD.cpp | 6 +++--- source/Core/Inc/Settings.h | 4 ++-- source/Core/Inc/Translation.h | 1 + source/Core/Src/Settings.cpp | 2 +- source/Core/Src/settingsGUI.cpp | 3 +++ 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Translations/translation_EN.json b/Translations/translation_EN.json index b44777e728..ce5b572835 100644 --- a/Translations/translation_EN.json +++ b/Translations/translation_EN.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "Enables BLE" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translations_definitions.json b/Translations/translations_definitions.json index 3e56219118..5f040f91d9 100644 --- a/Translations/translations_definitions.json +++ b/Translations/translations_definitions.json @@ -402,6 +402,12 @@ "maxLen": 7, "maxLen2": 15, "description": "Should BLE be enabled at boot time." - } + }, + { + "id": "PDVpdoEnabled", + "maxLen": 7, + "maxLen2": 15, + "description": "Enabled PPS/EPR modes." + } ] -} \ No newline at end of file +} diff --git a/source/Core/Drivers/USBPD.cpp b/source/Core/Drivers/USBPD.cpp index 29524a0dc9..ca5a72ee2e 100644 --- a/source/Core/Drivers/USBPD.cpp +++ b/source/Core/Drivers/USBPD.cpp @@ -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 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])); @@ -179,7 +179,7 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t } } #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])); uint8_t max_wattage = PD_APDO_AVS_MAX_POWER_GET(lastCapabilities[i]); @@ -372,4 +372,4 @@ void pdbs_dpm_get_sink_capability(pd_msg *cap, const bool isPD3) { // cap->hdr = hdr_template | PD_MSGTYPE_SINK_CAPABILITIES | PD_NUMOBJ(numobj); } -#endif \ No newline at end of file +#endif diff --git a/source/Core/Inc/Settings.h b/source/Core/Inc/Settings.h index df0d2cf492..0f3159c9b6 100644 --- a/source/Core/Inc/Settings.h +++ b/source/Core/Inc/Settings.h @@ -52,9 +52,9 @@ enum SettingsOptions { LOGOTime = 35, // Duration the logo will be displayed for CalibrateCJC = 36, // Toggle calibrate CJC at next boot BLEEnabled = 37, // Should BLE hardware be enabled if present - + PDVpdoEnabled = 38, // Should PPS/EPR be enabled // - SettingsOptionsLength = 38, // + SettingsOptionsLength = 39, // }; typedef enum { diff --git a/source/Core/Inc/Translation.h b/source/Core/Inc/Translation.h index 4f9c3861e2..0f36b5fb9a 100644 --- a/source/Core/Inc/Translation.h +++ b/source/Core/Inc/Translation.h @@ -86,6 +86,7 @@ enum class SettingsItemIndex : uint8_t { SettingsReset, LanguageSwitch, BLEEnabled, + PDVpdoEnabled, NUM_ITEMS, }; diff --git a/source/Core/Src/Settings.cpp b/source/Core/Src/Settings.cpp index e4d446adb1..9d393d239b 100644 --- a/source/Core/Src/Settings.cpp +++ b/source/Core/Src/Settings.cpp @@ -87,7 +87,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp {0, 5, 1, 1}, // LOGOTime {0, 1, 1, 0}, // CalibrateCJC {0, 1, 1, 1}, // BLEEnabled - + {0, 1, 1, 1}, // PDVpdoEnabled }; static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength)); diff --git a/source/Core/Src/settingsGUI.cpp b/source/Core/Src/settingsGUI.cpp index fc510f762a..479407ff18 100644 --- a/source/Core/Src/settingsGUI.cpp +++ b/source/Core/Src/settingsGUI.cpp @@ -26,6 +26,7 @@ static void displayQCInputV(void); #endif #if POW_PD static void displayPDNegTimeout(void); +static void displayPDVpdoEnabled(void); #endif static void displaySensitivity(void); static void displayShutdownTime(void); @@ -179,6 +180,7 @@ const menuitem powerMenu[] = { #endif #if POW_PD {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 {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); } } +static void displayPDVpdoEnabled(void) { OLED::drawCheckbox(getSettingValue(SettingsOptions::PDVpdoEnabled)); } #endif static bool setBoostTemp(void) { From 6729caa586b4ea767e6d772754155074c6bb36b1 Mon Sep 17 00:00:00 2001 From: Samuel Hedrick Date: Sun, 19 Feb 2023 16:03:49 -0600 Subject: [PATCH 2/5] Added English strings to other language .json files. --- Translations/translation_BE.json | 6 +++++- Translations/translation_BG.json | 6 +++++- Translations/translation_CS.json | 6 +++++- Translations/translation_DA.json | 6 +++++- Translations/translation_DE.json | 6 +++++- Translations/translation_EL.json | 6 +++++- Translations/translation_ES.json | 6 +++++- Translations/translation_FI.json | 6 +++++- Translations/translation_FR.json | 6 +++++- Translations/translation_HR.json | 6 +++++- Translations/translation_HU.json | 6 +++++- Translations/translation_IT.json | 6 +++++- Translations/translation_JA_JP.json | 6 +++++- Translations/translation_LT.json | 6 +++++- Translations/translation_NB.json | 6 +++++- Translations/translation_NL.json | 6 +++++- Translations/translation_NL_BE.json | 6 +++++- Translations/translation_PL.json | 6 +++++- Translations/translation_PT.json | 6 +++++- Translations/translation_RO.json | 6 +++++- Translations/translation_RU.json | 6 +++++- Translations/translation_SK.json | 6 +++++- Translations/translation_SL.json | 6 +++++- Translations/translation_SR_CYRL.json | 6 +++++- Translations/translation_SR_LATN.json | 6 +++++- Translations/translation_SV.json | 6 +++++- Translations/translation_TR.json | 6 +++++- Translations/translation_UK.json | 6 +++++- Translations/translation_VI.json | 6 +++++- Translations/translation_YUE_HK.json | 6 +++++- Translations/translation_ZH_CN.json | 6 +++++- Translations/translation_ZH_TW.json | 6 +++++- 32 files changed, 160 insertions(+), 32 deletions(-) diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index 2bfeec6733..3769325a3c 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_BG.json b/Translations/translation_BG.json index 5da07bcab3..195e31535d 100644 --- a/Translations/translation_BG.json +++ b/Translations/translation_BG.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index 5a21420fd2..24f46003ce 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_DA.json b/Translations/translation_DA.json index 8b6c7cfd30..e8ee504d9b 100644 --- a/Translations/translation_DA.json +++ b/Translations/translation_DA.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_DE.json b/Translations/translation_DE.json index 6e971c92f8..570bc99352 100644 --- a/Translations/translation_DE.json +++ b/Translations/translation_DE.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "Aktiviert BLE" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_EL.json b/Translations/translation_EL.json index d619a539c2..8278174711 100644 --- a/Translations/translation_EL.json +++ b/Translations/translation_EL.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_ES.json b/Translations/translation_ES.json index 14006b0692..4a6106fe21 100644 --- a/Translations/translation_ES.json +++ b/Translations/translation_ES.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Activado", "description": "Habilita BLE" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_FI.json b/Translations/translation_FI.json index ff220ea371..9a048c5d51 100644 --- a/Translations/translation_FI.json +++ b/Translations/translation_FI.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_FR.json b/Translations/translation_FR.json index 48cdc4a694..8006ccd7a7 100644 --- a/Translations/translation_FR.json +++ b/Translations/translation_FR.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Activé", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_HR.json b/Translations/translation_HR.json index ae5d627e89..6ba62752fe 100644 --- a/Translations/translation_HR.json +++ b/Translations/translation_HR.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_HU.json b/Translations/translation_HU.json index cb776a541f..e04dd9de56 100644 --- a/Translations/translation_HU.json +++ b/Translations/translation_HU.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_IT.json b/Translations/translation_IT.json index cabd357431..92f9c927b3 100644 --- a/Translations/translation_IT.json +++ b/Translations/translation_IT.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "Abilita\nBluetooth LE", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_JA_JP.json b/Translations/translation_JA_JP.json index 44ef9d882a..9fc8d3f520 100755 --- a/Translations/translation_JA_JP.json +++ b/Translations/translation_JA_JP.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE Enabled", "description": "Enables BLE" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_LT.json b/Translations/translation_LT.json index 24d5a65c18..c6abca98b3 100644 --- a/Translations/translation_LT.json +++ b/Translations/translation_LT.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_NB.json b/Translations/translation_NB.json index ad71b23acb..07d86d38a7 100644 --- a/Translations/translation_NB.json +++ b/Translations/translation_NB.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_NL.json b/Translations/translation_NL.json index 75055077cc..e995a6fc72 100644 --- a/Translations/translation_NL.json +++ b/Translations/translation_NL.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_NL_BE.json b/Translations/translation_NL_BE.json index f463f0d7cf..f6ef45d3ff 100644 --- a/Translations/translation_NL_BE.json +++ b/Translations/translation_NL_BE.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_PL.json b/Translations/translation_PL.json index 813f4cea51..f09150ccbc 100644 --- a/Translations/translation_PL.json +++ b/Translations/translation_PL.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_PT.json b/Translations/translation_PT.json index 32918db03c..1a9fe8022f 100644 --- a/Translations/translation_PT.json +++ b/Translations/translation_PT.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_RO.json b/Translations/translation_RO.json index 9892bf8b75..82bb3f93ed 100644 --- a/Translations/translation_RO.json +++ b/Translations/translation_RO.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_RU.json b/Translations/translation_RU.json index dbda0e1392..e243b43745 100644 --- a/Translations/translation_RU.json +++ b/Translations/translation_RU.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_SK.json b/Translations/translation_SK.json index 9a7f284d2e..868dfff003 100644 --- a/Translations/translation_SK.json +++ b/Translations/translation_SK.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_SL.json b/Translations/translation_SL.json index 009d31a80e..1a5fb1b0f7 100644 --- a/Translations/translation_SL.json +++ b/Translations/translation_SL.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_SR_CYRL.json b/Translations/translation_SR_CYRL.json index bf5be596ab..2c836525c3 100644 --- a/Translations/translation_SR_CYRL.json +++ b/Translations/translation_SR_CYRL.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_SR_LATN.json b/Translations/translation_SR_LATN.json index 7b921652e5..b9071857a7 100644 --- a/Translations/translation_SR_LATN.json +++ b/Translations/translation_SR_LATN.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_SV.json b/Translations/translation_SV.json index 5b8a8d3e46..6dd4751759 100644 --- a/Translations/translation_SV.json +++ b/Translations/translation_SV.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_TR.json b/Translations/translation_TR.json index 25f14dce5e..64f9e3c4b4 100644 --- a/Translations/translation_TR.json +++ b/Translations/translation_TR.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_UK.json b/Translations/translation_UK.json index e13b2b88e2..e081c1f141 100644 --- a/Translations/translation_UK.json +++ b/Translations/translation_UK.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_VI.json b/Translations/translation_VI.json index 960f2ba9a0..a7a9be8119 100644 --- a/Translations/translation_VI.json +++ b/Translations/translation_VI.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE\n Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_YUE_HK.json b/Translations/translation_YUE_HK.json index 3dacb87fdc..3572f81ec4 100644 --- a/Translations/translation_YUE_HK.json +++ b/Translations/translation_YUE_HK.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index 25d29b27fe..b152dfcb24 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } diff --git a/Translations/translation_ZH_TW.json b/Translations/translation_ZH_TW.json index 4e009263ee..12a95e7776 100644 --- a/Translations/translation_ZH_TW.json +++ b/Translations/translation_ZH_TW.json @@ -242,6 +242,10 @@ "BLEEnabled": { "displayText": "BLE Enabled", "description": "" - } + }, + "PDVpdoEnabled": { + "displayText": "PD VPDO\nEnabled", + "description": "Enables PPS/EPR modes." + } } } From cd21b49e8cd77d0c5a0e89f3d2ad1ec789982aaf Mon Sep 17 00:00:00 2001 From: Samuel Hedrick Date: Sun, 19 Feb 2023 16:22:46 -0600 Subject: [PATCH 3/5] Added BLE characteristic - PD VPDOs Enabled --- source/Core/BSP/Pinecilv2/ble_characteristics.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Core/BSP/Pinecilv2/ble_characteristics.h b/source/Core/BSP/Pinecilv2/ble_characteristics.h index fb8d39a327..a782e6c8ec 100644 --- a/source/Core/BSP/Pinecilv2/ble_characteristics.h +++ b/source/Core/BSP/Pinecilv2/ble_characteristics.h @@ -88,5 +88,6 @@ #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_37 BT_UUID_DECLARE_16(37) +#define BT_UUID_CHAR_BLE_SETTINGS_VALUE_38 BT_UUID_DECLARE_16(37) -#endif \ No newline at end of file +#endif From 20b4f80255d9526facce853f5b59b4936dae3da4 Mon Sep 17 00:00:00 2001 From: Samuelrmlink <125516872+Samuelrmlink@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:34:29 -0600 Subject: [PATCH 4/5] Attempt to reduce translation size. TS80P build failed Github checks. --- Translations/translation_ZH_CN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/translation_ZH_CN.json b/Translations/translation_ZH_CN.json index b152dfcb24..2a39bfb10e 100644 --- a/Translations/translation_ZH_CN.json +++ b/Translations/translation_ZH_CN.json @@ -245,7 +245,7 @@ }, "PDVpdoEnabled": { "displayText": "PD VPDO\nEnabled", - "description": "Enables PPS/EPR modes." + "description": "" } } } From 669e3819e8caa50800c0b1a988ede6a97c8d4b62 Mon Sep 17 00:00:00 2001 From: Samuelrmlink <125516872+Samuelrmlink@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:59:26 -0600 Subject: [PATCH 5/5] Add BLE characteristic - PD VPDOs Enabled --- source/Core/BSP/Pinecilv2/ble_peripheral.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Core/BSP/Pinecilv2/ble_peripheral.c b/source/Core/BSP/Pinecilv2/ble_peripheral.c index 1753f47a34..6227b26fa1 100644 --- a/source/Core/BSP/Pinecilv2/ble_peripheral.c +++ b/source/Core/BSP/Pinecilv2/ble_peripheral.c @@ -243,6 +243,8 @@ static struct bt_gatt_attr attrs[] = { 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, 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, ble_char_read_setting_value_callback, ble_char_write_setting_value_callback, NULL), @@ -286,4 +288,4 @@ void bt_enable_cb(int err) { bt_gatt_service_register(&ble_tp_server); ble_start_adv(); -} \ No newline at end of file +}