Skip to content

Commit

Permalink
Merge pull request #263 from brilliantlabsAR/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
siliconwitch authored Sep 5, 2023
2 parents d49821c + 2da79e3 commit 80944e3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
29 changes: 24 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug
"configurations": [
{
"cwd": "${workspaceFolder}",
"executable": "build/application.elf",
"name": "JLink",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"request": "launch",
"cwd": "${workspaceFolder}",
"executable": "build/application.elf",
"preLaunchTask": "Build",
"device": "nRF52832_xxAA",
"showDevDebugOutput": "none",
"servertype": "jlink",
"svdFile": "nrfx/mdk/nrf52.svd",
"preLaunchTask": "Build",
"loadFiles": [
"softdevice/s132_nrf52_7.3.0_softdevice.hex",
],
Expand All @@ -21,6 +21,25 @@
"monitor speed 2000",
"load"
],
},
{
"name": "Black Magic",
"type": "cortex-debug",
"servertype": "bmp",
"request": "launch",
"cwd": "${workspaceFolder}",
"executable": "build/application.elf",
"preLaunchTask": "Build",
"interface": "swd",
"device": "nRF52832_xxAA",
"BMPGDBSerialPort": "/dev/cu.usbmodem97B6BC101",
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"svdFile": "nrfx/mdk/nrf52.svd",
"preLaunchCommands": [
"monitor erase_mass",
"load softdevice/s132_nrf52_7.3.0_softdevice.hex",
],
}
]
}
2 changes: 1 addition & 1 deletion modules/camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(camera_sleep_obj, camera_sleep);
STATIC mp_obj_t camera_wake(void)
{
nrf_gpio_pin_write(CAMERA_SLEEP_PIN, false);
nrfx_systick_delay_ms(5);
nrfx_systick_delay_ms(100);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(camera_wake_obj, camera_wake);
Expand Down
3 changes: 1 addition & 2 deletions modules/microphone.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ STATIC mp_obj_t microphone_read(mp_obj_t samples)
uint8_t small_buffer[sizeof(buffer) / 2];
for (size_t i = 0; i < sizeof(buffer) / 2; i++)
{
uint16_t data16 = buffer[i * 2] << 8 | buffer[i + 2 + 1];
small_buffer[i] = data16 >> 8;
small_buffer[i] = buffer[i * 2];
}

return mp_obj_new_bytes(small_buffer, sizeof(small_buffer));
Expand Down

0 comments on commit 80944e3

Please sign in to comment.