From 20ae5c6e4818ab18b25152982e283cc949ea0aea Mon Sep 17 00:00:00 2001 From: Nathan Seidle Date: Thu, 23 May 2024 15:04:30 -0600 Subject: [PATCH] Change PointPerfect landing page based on platform Fix #320 --- Firmware/RTK_Everywhere/menuPP.ino | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Firmware/RTK_Everywhere/menuPP.ino b/Firmware/RTK_Everywhere/menuPP.ino index daf98ed9d..a41b871b0 100644 --- a/Firmware/RTK_Everywhere/menuPP.ino +++ b/Firmware/RTK_Everywhere/menuPP.ino @@ -329,10 +329,17 @@ bool pointperfectProvisionDevice() snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X%02X", btMACAddress[0], btMACAddress[1], btMACAddress[2], btMACAddress[3], btMACAddress[4], btMACAddress[5], productVariant); + char landingPageUrl[200] = ""; + if (productVariant == RTK_TORCH) + snprintf(landingPageUrl, sizeof(landingPageUrl), + "or goto https://www.sparkfun.com/rtk_torch_registration "); + else + systemPrintln("pointperfectProvisionDevice() Platform missing landing page"); + systemPrintf("This device has been deactivated. Please contact " - "support@sparkfun.com or goto https://www.sparkfun.com/pointperfect to renew the PointPerfect " + "support@sparkfun.com %sto renew the PointPerfect " "subscription. Please reference device ID: %s\r\n", - hardwareID); + landingPageUrl, hardwareID); displayAccountExpired(5000); } @@ -342,10 +349,17 @@ bool pointperfectProvisionDevice() snprintf(hardwareID, sizeof(hardwareID), "%02X%02X%02X%02X%02X%02X%02X", btMACAddress[0], btMACAddress[1], btMACAddress[2], btMACAddress[3], btMACAddress[4], btMACAddress[5], productVariant); + char landingPageUrl[200] = ""; + if (productVariant == RTK_TORCH) + snprintf(landingPageUrl, sizeof(landingPageUrl), + "or goto https://www.sparkfun.com/rtk_torch_registration "); + else + systemPrintln("pointperfectProvisionDevice() Platform missing landing page"); + systemPrintf("This device is not whitelisted. Please contact " - "support@sparkfun.com or goto https://www.sparkfun.com/pointperfect to get your subscription " + "support@sparkfun.com %sto get the subscription " "activated. Please reference device ID: %s\r\n", - hardwareID); + landingPageUrl, hardwareID); displayNotListed(5000); }