Skip to content

Commit d1e5e44

Browse files
committed
Merge remote-tracking branch 'theelims/main'
2 parents 0b5100d + a2414e7 commit d1e5e44

File tree

9 files changed

+39
-24
lines changed

9 files changed

+39
-24
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
2525
- Refactor System Status and Metrics, added PSRAM [#79](https://github.com/theelims/ESP32-sveltekit/pull/79)
2626
- Add /rest/coreDump endpoint [#87](https://github.com/theelims/ESP32-sveltekit/pull/87)
2727
- Rate limiting for MQTT publish messages. Can be configured as factory setting or at runtime. `0` will disable the rate limiting.
28+
- Added [discord](https://discord.gg/MTn9mVUG5n) invite to readme.md and docs.
2829
- Added build flag `-D TELEPLOT_TASKS` to plot task heap high water mark with teleplot. You can include this in your tasks as well:
2930

3031
```cpp
@@ -61,6 +62,7 @@ All notable changes to this project will be documented in this file.
6162
- Fixed bug in WiFiSettingsService preventing discovery of networks other than the first
6263
- Fixed mixup pull up and pull down when configuring wake up pin in SleepService.cpp
6364
- Wifi: Multiple edits bug resolved [#79](https://github.com/theelims/ESP32-sveltekit/pull/79)
65+
- Fixed broken link to Adafruit SSL Cert Store [#93](https://github.com/theelims/ESP32-sveltekit/pull/93)
6466

6567
### Removed
6668

docs/buildprocess.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ board_build.embed_files = src/certs/x509_crt_bundle.bin
162162
board_ssl_cert_source = adafruit
163163
```
164164

165-
The script will download a public certificate store from Mozilla (`board_ssl_cert_source = mozilla`) or a repository curated by Adafruit (`board_ssl_cert_source = adafruit`), builds a binary containing all certs and embeds this into the firmware. This will add ~65kb to the firmware image. Should you only need a few known certificates you can place their `*.pem` or `*.der` files in the [ssl_certs](https://github.com/theelims/ESP32-sveltekit/blob/main/ssl_certs) folder and change `board_ssl_cert_source = folder`. Then only these certificates will be included in the store. This is especially useful, if you only need to connect to know servers and need to shave some kb off the firmware image:
165+
The script will download a public certificate store from Mozilla (`board_ssl_cert_source = mozilla`) or a repository curated by Adafruit (`board_ssl_cert_source = adafruit`) or (`board_ssl_cert_source = adafruit-full`), builds a binary containing all certs and embeds this into the firmware. This will add ~65kb to the firmware image. Should you only need a few known certificates you can place their `*.pem` or `*.der` files in the [ssl_certs](https://github.com/theelims/ESP32-sveltekit/blob/main/ssl_certs) folder and change `board_ssl_cert_source = folder`. Then only these certificates will be included in the store. This is especially useful, if you only need to connect to know servers and need to shave some kb off the firmware image:
166166

167167
!!! info
168168

docs/develop/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* CI automation (Generate daily builds in Github and use by installer)
3434
* Palettes: more, custom, audio reactive
3535

36-
Contact us in the MoonLight channels on [Discord MoonModules](https://discord.gg/4rSTthvKHe)
36+
Contact us in the MoonLight channels on [Discord MoonModules](https://discord.gg/TC8NSUSCdV)
3737

3838
## Pull Requests
3939

factory_settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ build_flags =
3737

3838
; MQTT settings
3939
-D FACTORY_MQTT_ENABLED=false
40-
-D FACTORY_MQTT_URI=\"mqtts://mqtt.eclipseprojects.io:8883\"
40+
-D FACTORY_MQTT_URI=\"mqtts://broker.hivemq.com:8883\"
4141
-D FACTORY_MQTT_USERNAME=\"\" ; supports placeholders
4242
-D FACTORY_MQTT_PASSWORD=\"\"
4343
-D FACTORY_MQTT_CLIENT_ID=\"#{platform}-#{unique_id}\" ; supports placeholders

interface/src/routes/menu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
3131
const github = { href: 'https://github.com/' + page.data.github, active: true };
3232
33-
const discord = { href: '.', active: false };
33+
const discord = { href: 'https://discord.gg/TC8NSUSCdV', active: true };
3434
3535
type menuItem = {
3636
title: string;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { PageLoad } from './$types';
2+
3+
export const load = (async () => {
4+
return { title: 'Core Dump' };
5+
}) satisfies PageLoad;

interface/src/routes/system/metrics/SystemMetrics.svelte

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
2-
import { onDestroy, onMount } from 'svelte';
3-
import { page } from '$app/state';
2+
import { onMount } from 'svelte';
43
import SettingsCard from '$lib/components/SettingsCard.svelte';
54
import { slide } from 'svelte/transition';
65
import { cubicOut } from 'svelte/easing';
@@ -13,21 +12,24 @@
1312
Chart.register(...registerables);
1413
1514
// 🌙
16-
let lpsChartElement: HTMLCanvasElement = $state();
15+
let lpsChartElement: HTMLCanvasElement | undefined = $state();
1716
let lpsChart: Chart;
1817
19-
let heapChartElement: HTMLCanvasElement = $state();
18+
let heapChartElement: HTMLCanvasElement | undefined = $state();
2019
let heapChart: Chart;
2120
22-
let psramChartElement: HTMLCanvasElement = $state();
21+
let psramChartElement: HTMLCanvasElement | undefined = $state();
2322
let psramChart: Chart;
2423
25-
let filesystemChartElement: HTMLCanvasElement = $state();
24+
let filesystemChartElement: HTMLCanvasElement | undefined = $state();
2625
let filesystemChart: Chart;
2726
28-
let temperatureChartElement: HTMLCanvasElement = $state();
27+
let temperatureChartElement: HTMLCanvasElement | undefined = $state();
2928
let temperatureChart: Chart;
3029
30+
// Check if PSRAM data is available
31+
let hasPsramData = $derived(Math.max(...$analytics.psram_size) > 0);
32+
3133
onMount(() => {
3234
// 🌙
3335
lpsChart = new Chart(lpsChartElement, {
@@ -168,7 +170,10 @@
168170
}
169171
}
170172
});
171-
psramChart = new Chart(psramChartElement, {
173+
174+
// Only create PSRAM chart if PSRAM data is available
175+
if (hasPsramData) {
176+
psramChart = new Chart(psramChartElement, {
172177
type: 'line',
173178
data: {
174179
labels: $analytics.uptime,
@@ -178,7 +183,7 @@
178183
borderColor: daisyColor('--color-primary'),
179184
backgroundColor: daisyColor('--color-primary', 50),
180185
borderWidth: 2,
181-
data: $analytics.free_psram,
186+
data: $analytics.used_psram,
182187
yAxisID: 'y'
183188
}
184189
]
@@ -233,6 +238,8 @@
233238
}
234239
}
235240
});
241+
}
242+
236243
filesystemChart = new Chart(filesystemChartElement, {
237244
type: 'line',
238245
data: {
@@ -381,7 +388,7 @@
381388
heapChart.update('none');
382389
heapChart.options.scales.y.max = Math.round(Math.max(...$analytics.total_heap));
383390
384-
if (Math.max(...$analytics.psram_size)) {
391+
if (hasPsramData) {
385392
psramChart.data.labels = $analytics.uptime;
386393
psramChart.data.datasets[0].data = $analytics.used_psram;
387394
psramChart.update('none');
@@ -451,7 +458,7 @@
451458
<canvas bind:this={heapChartElement}></canvas>
452459
</div>
453460
</div>
454-
{#if Math.max(...$analytics.psram_size)}
461+
{#if hasPsramData}
455462
<div class="w-full overflow-x-auto">
456463
<div
457464
class="flex w-full flex-col space-y-1 h-60"

lib/framework/WiFiSettingsService.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ class WiFiSettings
106106
wifiNetwork["static_ip_config"] = wifi.staticIPConfig;
107107

108108
// extended settings
109-
JsonUtils::writeIP(root, "local_ip", wifi.localIP);
110-
JsonUtils::writeIP(root, "gateway_ip", wifi.gatewayIP);
111-
JsonUtils::writeIP(root, "subnet_mask", wifi.subnetMask);
112-
JsonUtils::writeIP(root, "dns_ip_1", wifi.dnsIP1);
113-
JsonUtils::writeIP(root, "dns_ip_2", wifi.dnsIP2);
109+
JsonUtils::writeIP(wifiNetwork, "local_ip", wifi.localIP);
110+
JsonUtils::writeIP(wifiNetwork, "gateway_ip", wifi.gatewayIP);
111+
JsonUtils::writeIP(wifiNetwork, "subnet_mask", wifi.subnetMask);
112+
JsonUtils::writeIP(wifiNetwork, "dns_ip_1", wifi.dnsIP1);
113+
JsonUtils::writeIP(wifiNetwork, "dns_ip_2", wifi.dnsIP2);
114114
}
115115

116116
ESP_LOGV(SVK_TAG, "WiFi Settings read");

scripts/generate_cert_bundle.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535

3636
ca_bundle_bin_file = 'x509_crt_bundle.bin'
3737
mozilla_cacert_url = 'https://curl.se/ca/cacert.pem'
38-
# adafruit_cacert_url = 'https://raw.githubusercontent.com/adafruit/certificates/main/data/roots.pem'
39-
# adafruit_cacert_url = 'https://raw.githubusercontent.com/adafruit/certificates/main/data/roots-full.pem'
40-
adafruit_cacert_url = 'https://raw.githubusercontent.com/adafruit/certificates/main/data/roots-filtered.pem'
38+
adafruit_filtered_cacert_url = 'https://raw.githubusercontent.com/adafruit/certificates/main/data/roots-filtered.pem'
39+
adafruit_full_cacert_url = 'https://raw.githubusercontent.com/adafruit/certificates/main/data/roots-full.pem'
4140
certs_dir = Path("./ssl_certs")
4241
binary_dir = Path("./src/certs")
4342

@@ -47,7 +46,9 @@ def download_cacert_file(source):
4746
if source == "mozilla":
4847
response = requests.get(mozilla_cacert_url)
4948
elif source == "adafruit":
50-
response = requests.get(adafruit_cacert_url)
49+
response = requests.get(adafruit_filtered_cacert_url)
50+
elif source == "adafruit-full":
51+
response = requests.get(adafruit_full_cacert_url)
5152
else:
5253
raise InputError('Invalid certificate source')
5354

0 commit comments

Comments
 (0)