Skip to content

Commit 79715f8

Browse files
committed
update platform version
1 parent dd423ba commit 79715f8

File tree

6 files changed

+33
-29
lines changed

6 files changed

+33
-29
lines changed

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ hardware/pcb-*/fp-info-cache
1010
hardware/pcb-*/fp-lib-table
1111
hardware/pcb-*/sym-lib-table
1212
hmac_key
13-
*.kicad_prl
14-
*.step
15-
*.lck
16-
*.sw*
1713
*.bin
14+
*.bmp
1815
*.FCBak
16+
*.kicad_prl
17+
*.lck
1918
*.pem
19+
*.png
2020
*.pub
21+
*.step
22+
*.sw*

noisemeter-device/access-point.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "board.h"
2020
#include "timestamp.h"
2121

22+
#include <WiFi.h>
2223
#include <WiFiAP.h>
2324

2425
constexpr int DNSPort = 53;
@@ -78,7 +79,7 @@ void AccessPoint::run()
7879
}
7980
}
8081

81-
bool AccessPoint::canHandle(HTTPMethod, String)
82+
bool AccessPoint::canHandle(HTTPMethod, const String&)
8283
{
8384
return true;
8485
}
@@ -122,7 +123,7 @@ static String waitingHtml()
122123
return html;
123124
}
124125

125-
bool AccessPoint::handle(WebServer& server, HTTPMethod method, String uri)
126+
bool AccessPoint::handle(WebServer& server, HTTPMethod method, const String& uri)
126127
{
127128
if (method == HTTP_POST) {
128129
if (uri == "/submit") {

noisemeter-device/access-point.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ class AccessPoint : public RequestHandler
8787
static String htmlFromMsg(const char *msg, const char *extra = nullptr);
8888

8989
/** Determines which HTTP requests should be handled. */
90-
bool canHandle(HTTPMethod, String) override;
90+
virtual bool canHandle(HTTPMethod, const String&) override;
9191
/** Handles requests by redirecting to the setup page. */
92-
bool handle(WebServer&, HTTPMethod, String) override;
92+
virtual bool handle(WebServer&, HTTPMethod, const String&) override;
9393

9494
static void taskOnCredentialsReceived(void *param);
9595
};

noisemeter-device/ota-update.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <WiFiClientSecure.h>
2525
#include <mbedtls/pk.h>
2626
#include <mbedtls/md.h>
27-
#include <mbedtls/md_internal.h>
27+
#include <mbedtls/private_access.h>
2828

2929
#include "board.h"
3030

@@ -141,10 +141,11 @@ bool applyUpdate(WiFiClientSecure& client, int totalSize)
141141
}
142142

143143
if (totalSize == 0) {
144-
unsigned char hash[mdinfo->size];
144+
const auto mdsize = mbedtls_md_get_size(mdinfo);
145+
unsigned char hash[mdsize];
145146
mbedtls_md_finish(&rsa, hash);
146147

147-
auto ret = mbedtls_pk_verify(&pk, MBEDTLS_MD_SHA256, hash, mdinfo->size,
148+
auto ret = mbedtls_pk_verify(&pk, MBEDTLS_MD_SHA256, hash, sizeof(hash),
148149
signature.data(), signature.size());
149150
mbedtls_md_free(&rsa);
150151
mbedtls_pk_free(&pk);

noisemeter-device/sos-iir-filter.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ No_IIR_Filter None;
228228
// See: https://www.dsprelated.com/freebooks/filters/DC_Blocker.html
229229
// a1 = -0.9992 should heavily attenuate frequencies below 10Hz
230230
SOS_IIR_Filter DC_BLOCKER = {
231-
gain: 1.0,
232-
sos: { { -1.0, 0.0, +0.9992, 0 } }
231+
/* gain: */ 1.0,
232+
/* sos: */ { { -1.0, 0.0, +0.9992, 0 } }
233233
};
234234

235235
//
@@ -249,8 +249,8 @@ SOS_IIR_Filter DC_BLOCKER = {
249249
// B = [0.477326418836803, -0.486486982406126, -0.336455844522277, 0.234624646917202, 0.111023257388606];
250250
// A = [1.0, -1.93073383849136326, 0.86519456089576796, 0.06442838283825100, 0.00111249298800616];
251251
SOS_IIR_Filter ICS43434 = {
252-
gain: 0.477326418836803,
253-
sos: { // Second-Order Sections {b1, b2, -a1, -a2}
252+
/* gain: */ 0.477326418836803,
253+
/* sos: */ { // Second-Order Sections {b1, b2, -a1, -a2}
254254
{ +0.96986791463971267, 0.23515976355743193, -0.06681948004769928, -0.00111521990688128 },
255255
{ -1.98905931743624453, 0.98908924206960169, +1.99755331853906037, -0.99755481510122113 } }
256256
};
@@ -260,8 +260,8 @@ SOS_IIR_Filter ICS43434 = {
260260
// B = [-0.45733702338341309 1.12228667105574775 -0.77818278904413563, 0.00968926337978037, 0.10345668405223755]
261261
// A = [1.0, -3.3420781082912949, 4.4033694320978771, -3.0167072679918010, 1.2265536567647031, -0.2962229189311990, 0.0251085747458112]
262262
SOS_IIR_Filter ICS43432 = {
263-
gain: -0.457337023383413,
264-
sos: { // Second-Order Sections {b1, b2, -a1, -a2}
263+
/* gain: */ -0.457337023383413,
264+
/* sos: */ { // Second-Order Sections {b1, b2, -a1, -a2}
265265
{ -0.544047931916859, -0.248361759321800, +0.403298891662298, -0.207346186351843 },
266266
{ -1.909911869441421, +0.910830292683527, +1.790285722826743, -0.804085812369134 },
267267
{ +0.000000000000000, +0.000000000000000, +1.148493493802252, -0.150599527756651 } }
@@ -272,8 +272,8 @@ SOS_IIR_Filter ICS43432 = {
272272
// B ~= [1.00198, -1.99085, 0.98892]
273273
// A ~= [1.0, -1.99518, 0.99518]
274274
SOS_IIR_Filter INMP441 = {
275-
gain: 1.00197834654696,
276-
sos: { // Second-Order Sections {b1, b2, -a1, -a2}
275+
/* gain: */ 1.00197834654696,
276+
/* sos: */ { // Second-Order Sections {b1, b2, -a1, -a2}
277277
{ -1.986920458344451, +0.986963226946616, +1.995178510504166, -0.995184322194091 } }
278278
};
279279

@@ -283,8 +283,8 @@ SOS_IIR_Filter INMP441 = {
283283
// A ~= [1.0, -1.997675693595542, 0.997677044195563]
284284
// With additional DC blocking component
285285
SOS_IIR_Filter IM69D130 = {
286-
gain: 1.00124068496753,
287-
sos: {
286+
/* gain: */ 1.00124068496753,
287+
/* sos: */ {
288288
{ -1.0, 0.0, +0.9992, 0 }, // DC blocker, a1 = -0.9992
289289
{ -1.994461610298131, 0.994469278738208, +1.997675693595542, -0.997677044195563 } }
290290
};
@@ -295,8 +295,8 @@ SOS_IIR_Filter IM69D130 = {
295295
// A ~= [1.0, -1.993853, 0.993863]
296296
// With additional DC blocking component
297297
SOS_IIR_Filter SPH0645LM4H_B_RB = {
298-
gain: 1.00123377961525,
299-
sos: { // Second-Order Sections {b1, b2, -a1, -a2}
298+
/* gain: */ 1.00123377961525,
299+
/* sos: */ { // Second-Order Sections {b1, b2, -a1, -a2}
300300
{ -1.0, 0.0, +0.9992, 0 }, // DC blocker, a1 = -0.9992
301301
{ -1.988897663539382, +0.988928479008099, +1.993853376183491, -0.993862821429572 } }
302302
};
@@ -311,8 +311,8 @@ SOS_IIR_Filter SPH0645LM4H_B_RB = {
311311
// B = [0.169994948147430, 0.280415310498794, -1.120574766348363, 0.131562559965936, 0.974153561246036, -0.282740857326553, -0.152810756202003]
312312
// A = [1.0, -2.12979364760736134, 0.42996125885751674, 1.62132698199721426, -0.96669962900852902, 0.00121015844426781, 0.04400300696788968]
313313
SOS_IIR_Filter A_weighting = {
314-
gain: 0.169994948147430,
315-
sos: { // Second-Order Sections {b1, b2, -a1, -a2}
314+
/* gain: */ 0.169994948147430,
315+
/* sos: */ { // Second-Order Sections {b1, b2, -a1, -a2}
316316
{ -2.00026996133106, +1.00027056142719, -1.060868438509278, -0.163987445885926 },
317317
{ +4.35912384203144, +3.09120265783884, +1.208419926363593, -0.273166998428332 },
318318
{ -0.70930303489759, -0.29071868393580, +1.982242159753048, -0.982298594928989 } }
@@ -324,8 +324,8 @@ SOS_IIR_Filter A_weighting = {
324324
// B = [-0.49164716933714026, 0.14844753846498662, 0.74117815661529129, -0.03281878334039314, -0.29709276192593875, -0.06442545322197900, -0.00364152725482682]
325325
// A = [1.0, -1.0325358998928318, -0.9524000181023488, 0.8936404694728326 0.2256286147169398 -0.1499917107550188, 0.0156718181681081]
326326
SOS_IIR_Filter C_weighting = {
327-
gain: -0.491647169337140,
328-
sos: {
327+
/* gain: */ -0.491647169337140,
328+
/* sos: */ {
329329
{ +1.4604385758204708, +0.5275070373815286, +1.9946144559930252, -0.9946217070140883 },
330330
{ +0.2376222404939509, +0.0140411206016894, -1.3396585608422749, -0.4421457807694559 },
331331
{ -2.0000000000000000, +1.0000000000000000, +0.3775800047420818, -0.0356365756680430 } }

platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ default_envs = esp32-pcb
1616
[env]
1717
extra_scripts = build_hooks.py
1818
framework = arduino
19-
platform = espressif32@6.1.0
19+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
2020
board_build.partitions = nmpartitions.csv
2121
lib_deps =
2222
bblanchon/ArduinoJson@^7.0.2
@@ -26,7 +26,7 @@ build_unflags =
2626
build_flags =
2727
-std=gnu++17
2828
-DNO_GLOBAL_EEPROM
29-
-DNOISEMETER_VERSION=\"0.2.3\"
29+
-DNOISEMETER_VERSION=\"0.2.4\"
3030
-Wall -Wextra
3131

3232
# Optional build flags:

0 commit comments

Comments
 (0)