Skip to content

Commit

Permalink
RADIO WORKS
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Shipman committed Dec 9, 2023
1 parent c5d92d3 commit bd37f79
Show file tree
Hide file tree
Showing 12 changed files with 18,276 additions and 18,438 deletions.
Binary file modified Code/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions Code/XbeeJoint/test/SX1262.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,12 @@ void set_tx_continuous_wave() {

void set_tx() {
const uint8_t timeout3 = 0x00;
const uint8_t timeout2 = 0x7D;
const uint8_t timeout2 = 0x00;
const uint8_t timeout1 = 0x00;

#if DEBUG
// #if DEBUG
printf("Setting Mode TX\n");
#endif
// #endif

gpio_put(CS_PIN, 0);
spi_write_blocking(spi, &set_tx_cmd, 1);
Expand Down
2 changes: 1 addition & 1 deletion Code/XbeeJoint/test/build/CMakeCache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ PICO_BOOT_STAGE2_DIR:INTERNAL=/Users/michaelshipman/Developer/command_module/Cod
PICO_CMAKE_PRELOAD_PLATFORM_DIR:INTERNAL=/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/cmake/preload/platforms
PICO_CMAKE_PRELOAD_PLATFORM_FILE:INTERNAL=/Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/cmake/preload/platforms/rp2040.cmake
PICO_COMPILER_ASM:INTERNAL=/opt/homebrew/bin/arm-none-eabi-gcc
PICO_DOXYGEN_EXCLUDE_PATHS:INTERNAL= /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs
PICO_DOXYGEN_EXCLUDE_PATHS:INTERNAL= /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common/cmsis /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040/hardware_regs
PICO_DOXYGEN_PATHS:INTERNAL= /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/common /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/lib/cyw43-driver/src /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2_common /Users/michaelshipman/Developer/command_module/Code/XbeeJoint/pico-sdk/src/rp2040
PICO_NO_HARDWARE:INTERNAL=0
PICO_ON_DEVICE:INTERNAL=1
Expand Down
Binary file modified Code/XbeeJoint/test/build/CMakeFiles/test.dir/SX1262.cpp.obj
Binary file not shown.
Binary file modified Code/XbeeJoint/test/build/CMakeFiles/test.dir/test.cpp.obj
Binary file not shown.
Binary file modified Code/XbeeJoint/test/build/test.bin
Binary file not shown.
30,695 changes: 15,297 additions & 15,398 deletions Code/XbeeJoint/test/build/test.dis

Large diffs are not rendered by default.

Binary file modified Code/XbeeJoint/test/build/test.elf
Binary file not shown.
1,158 changes: 578 additions & 580 deletions Code/XbeeJoint/test/build/test.elf.map

Large diffs are not rendered by default.

4,794 changes: 2,388 additions & 2,406 deletions Code/XbeeJoint/test/build/test.hex

Large diffs are not rendered by default.

Binary file modified Code/XbeeJoint/test/build/test.uf2
Binary file not shown.
59 changes: 9 additions & 50 deletions Code/XbeeJoint/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#define FLASH_TARGET_OFFSET (PICO_FLASH_SIZE_BYTES - FLASH_SECTOR_SIZE)

#define RX_TEST 1
#define TX_TEST 1
#define TX_TEST 0

void rx_test(void);
void transmit_test(void);

// For the functionality of a BITSv5 board
// NOT FLIGHT CODE
// For the functionality of a (Not)Xbee Joint board
// NOT PRODUCTION CODE
int main() {
uint8_t i = 0;

Expand All @@ -38,68 +38,27 @@ int main() {
write_radio_buffer();

while (true) {
printf("\n\n\n");
printf("======Hello, Xbee Joint!======\n");

// printf("Enter char to Receive: ");
// printf("%c\n", getchar_timeout_us(0));

#if TX_TEST
transmit_test();
sleep_ms(5000);
#endif

sleep_ms(1000);

#if RX_TEST
rx_test();
get_radio_errors();
#endif

sleep_ms(5000);
printf("\n\n\n");

sleep_ms(10);
}
}

// void transmit_test() {
// printf("Transmitting\n");

// radio_send();

// sleep_ms(100);

// get_radio_errors();

// // #if DEBUG

// get_irq_status();

// // get_irq_status();
// // #endif

// clear_irq_status();
// }

// void rx_test() {
// radio_receive_single();

// while (!gpio_get(DIO1_PIN)) {
// printf("%d", gpio_get(DIO1_PIN));
// sleep_ms(10);
// }

// sleep_ms(100);

// get_rx_buffer_status();

// // #if DEBUG
// get_irq_status();
// // #endif

// clear_irq_status();
// // get_irq_status();

// read_radio_buffer();
// }

void transmit_test() {
printf("Transmit Test\n");

Expand All @@ -118,10 +77,10 @@ void rx_test() {
radio_receive_single();

while (!gpio_get(DIO1_PIN)) {
sleep_ms(10);
sleep_ms(1);
}

sleep_ms(10);
// sleep_ms(10);

get_rx_buffer_status();

Expand Down

0 comments on commit bd37f79

Please sign in to comment.