From a23322dddf3ec58e37a976b995c30a2814c36b85 Mon Sep 17 00:00:00 2001 From: Dan Priece Date: Fri, 17 Jul 2026 15:04:49 -0400 Subject: [PATCH] working version --- ChronoWebServer.cpp | 263 +------------------------------------------- 1 file changed, 4 insertions(+), 259 deletions(-) diff --git a/ChronoWebServer.cpp b/ChronoWebServer.cpp index 76cfe1b..4a96fd5 100644 --- a/ChronoWebServer.cpp +++ b/ChronoWebServer.cpp @@ -44,265 +44,10 @@ void (*testModeCallback)(); // Constructor implementation ChronoWebServer::ChronoWebServer() {} void ChronoWebServer::_handleRoot() { - String temp="\ - \ - FX Chronograph Display Settings\ - \ - \ - \ - \ -

ChronoDisplay Settings

\ -
\ -

Control Panel

\ - \ - \ - \ - \ -
\ -
\ -

WiFi Configuration

\ -

Mode: Unknown

\ -

Current WiFi: Not configured

\ -
\ -
\ -
\ -
\ -
\ -
\ - \ -
\ -

After saving, the device will attempt to connect to the new WiFi network.

\ - \ -
\ -
\ -
\ -

OTA Firmware Update

\ -

Current Version: Unknown

\ - \ -

1. Select a .bin firmware file to update over-the-air

\ - \ -

2. Click OTA Upgrade to install

\ -
\ -
\ -

Gun Profiles

\ - \ - "; - ChronoReadingManager& chronoReadings = ChronoReadingManager::getInstance(); - - String currentGunName=chronoReadings.getProfile().getGunProfile().getName(); - int currentGunPowerLevel=chronoReadings.getProfile().getGunProfile().getPowerLevel(); - LinkedList& gprofiles= chronoReadings.getGunProfiles(); - for(int i=0;i"; - } - else{ - temp +=""; - } - temp +=""; - } - -temp +="
NameType
"+name+""+type+"
\ - \ -
\ -
\ -

Projectile Profiles

\ - \ - "; - String currentProjectileProfileName=chronoReadings.getProfile().getProjectileProfile().getName(); - float currentProjectileProfileWeight=chronoReadings.getProfile().getProjectileProfile().getWeight(); - LinkedList& profiles= chronoReadings.getProjectileProfiles(); - for(int i=0;i"; - } - else{ - temp +=""; - } - temp +=""; - } - - - temp +="
NameTypeCaliberWeight
"+name+""+type+""+cal+""+weight+"
\ - \ -
\ - \ -"; - _server.send(200, "text/html", temp); + String temp="ChronoDisplay

ChronoDisplay

Latest Reading

--
FPS
--
FPE
0
Shots
--
Avg
--
Low
--
High

Reading History

ShotFPSFPEGunPowerProjectileCalWt

Gun Profiles

NameType

Projectile Profiles

NameTypeCalWt

WiFi

Mode: ?
WiFi: --

After saving, device will restart.

OTA Update

Version: ?

Control

"; + _server.send(200, "text/html", temp); } + void ChronoWebServer::_handleGunProfile(){ String temp="\ \ @@ -733,7 +478,7 @@ void ChronoWebServer::process(){ } void ChronoWebServer::_handleVersion() { - String versionJson = String("{\"version\":\"") + CHRONO_VERSION + "\",\"major\":" + String(CHRONO_VERSION_MAJOR) + ",\"minor\":" + String(CHRONO_VERSION_MINOR) + ",\"patch\":" + String(CHRONO_VERSION_PATCH) + "}"; + String versionJson = String("{'version':'") + CHRONO_VERSION + "','major':" + String(CHRONO_VERSION_MAJOR) + ",'minor':" + String(CHRONO_VERSION_MINOR) + ",'patch':" + String(CHRONO_VERSION_PATCH) + "}"; _server.send(200, "application/json", versionJson); }