-
-
-
@@ -117,12 +142,14 @@
Source for the calculations is at this
github
and the
original website.
diff --git a/src/routes/tools/battery-life-calculator/comps/BatteryCalc.js b/src/routes/tools/battery-life-calculator/pageSrc/BatteryCalc.js
similarity index 100%
rename from src/routes/tools/battery-life-calculator/comps/BatteryCalc.js
rename to src/routes/tools/battery-life-calculator/pageSrc/BatteryCalc.js
diff --git a/src/routes/tools/battery-life-calculator/pageSrc/MCU_defs.ts b/src/routes/tools/battery-life-calculator/pageSrc/MCU_defs.ts
new file mode 100644
index 0000000..ab20115
--- /dev/null
+++ b/src/routes/tools/battery-life-calculator/pageSrc/MCU_defs.ts
@@ -0,0 +1,53 @@
+export interface MCU_Type {
+ name: string;
+ cpu: { [key: string]: Number }; // state: power consumption
+ sleep: { [key: string]: Number };
+ wifi?: { [key: string]: Number };
+ bluetooth?: { [key: string]: Number };
+}
+
+export const MCUs: MCU_Type[] = [
+ {
+ name: "ESP32-S3",
+ cpu: { // mili amps
+ single_core_40MHz: 21.8,
+ dual_core_40MHz: 24.4,
+ single_core_80MHz: 42.6,
+ dual_core_80MHz: 47.3,
+ single_core_160MHz: 54.6,
+ dual_core_160MHz: 54.1,
+ single_core_240MHz: 65.9,
+ dual_core_240MHz: 81.3,
+ },
+ sleep: {
+
+ },
+ wifi: { //
+ dBm_21: 318.2,
+ sleep: 10
+ },
+ bluetooth: {
+ active: 100,
+ sleep: 5
+ }
+ },
+
+ {
+ name: "ESP32-C3",
+ cpu: {
+ active: 130,
+ sleep: 15
+ },
+ sleep: {
+
+ },
+ wifi: {
+ active: 110,
+ sleep: 9
+ },
+ bluetooth: {
+ active: 90,
+ sleep: 4
+ }
+ }
+];
From d025b2432b532c2f808606f8aea1d952d2706f3b Mon Sep 17 00:00:00 2001
From: Your Name
Date: Tue, 25 Feb 2025 16:04:15 +0100
Subject: [PATCH 2/2] Update buildscript
---
build.sh | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/build.sh b/build.sh
index c63e37b..4c2182b 100755
--- a/build.sh
+++ b/build.sh
@@ -4,28 +4,10 @@
# NODE_ENV is set to production, npm won't install anything
unset NODE_ENV
-echo "Rebuilding deprived main site"
-echo "cwd: ${pwd}"
-
-#rm -rf deprived-main-website
-#git clone https://gitea.deprived.dev/Sveskejuice/deprived-main-website.git
-
-git restore .
-git clean -fd
git pull
-git checkout WeGoingBasic
+git reset --hard WeGoingBasic
-echo "Project files up to date. Proceeding to install deps"
-
-echo "npm config list:"
-npm config list
-
-npm cache clean --force
-npm i
-npm i @sveltejs/adapter-static
-npm i @sveltejs/kit
-npm i @zerodevx/svelte-img
-npm tailwind init
+npm ci
echo "Ready to build, building..."