Skip to content

Commit c79ce62

Browse files
Overwrite default CODAL uBit.audio.levelSPL 8-bit conversion range. (#481)
codal-core has set the default min and max values to 35 and 100 in: lancaster-university/codal-core@d376f1a MakeCode uses 52 to 120, and MicroPython 52 to 100: - https://github.com/microsoft/pxt-microbit/blob/v7.1.31/libs/microphone/microphone.cpp#L8-L9 - microbit-foundation/micropython-microbit-v2#132 (comment) With the current SoundLevelSPL we don't get values much larger than 100 dB, so it makes sense to make the micro:bit target default to 100 instead of 120. This was originally intended to go in codal-microbit-v2 v0.2.44, but it we never got around to it.
1 parent 03167dd commit c79ce62

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

target-locked.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
"HARDWARE_NEOPIXEL": 1,
3333
"LED_MATRIX_MAXIMUM_BRIGHTNESS": 245,
3434
"LED_MATRIX_MINIMUM_BRIGHTNESS": 1,
35+
"LEVEL_DETECTOR_SPL_8BIT_000_POINT": 52.0,
36+
"LEVEL_DETECTOR_SPL_8BIT_255_POINT": 100.0,
3537
"MBED_CONF_NORDIC_NRF_LF_CLOCK_SRC": "NRF_LF_SRC_XTAL",
3638
"MESSAGE_BUS_LISTENER_MAX_QUEUE_DEPTH": 10,
3739
"NRF52ADC_SOFTWARE_OVERSAMPLING": 1,

target.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"HARDWARE_NEOPIXEL": 1,
4444
"CODAL_TIMER_32BIT": 1,
4545
"DEVICE_BLE": 1,
46+
"LEVEL_DETECTOR_SPL_8BIT_000_POINT": 52.0,
47+
"LEVEL_DETECTOR_SPL_8BIT_255_POINT": 100.0,
4648
"CODAL_VERSION": "\"unknown\""
4749
},
4850
"definitions":"-DAPP_TIMER_V2 -DAPP_TIMER_V2_RTC1_ENABLED -DNRF_DFU_TRANSPORT_BLE=1 -DNRF52833_XXAA -DNRF52833 -DTARGET_MCU_NRF52833 -DNRF5 -DNRF52833 -D__CORTEX_M4 -DS113 -DTOOLCHAIN_GCC -D__START=target_start",

0 commit comments

Comments
 (0)