summaryrefslogtreecommitdiff
path: root/controller/fw/src/protocol.c
blob: bbee5ef8c97ee7b0dd00347d79fd2479fadbcdb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "sr_global.h"
#include "dsss_demod.h"
#include "con_usart.h"

void handle_dsss_received(uint8_t data[static TRANSMISSION_SYMBOLS]) {
    con_printf("DSSS data received: ");
    for (int i=0; i<TRANSMISSION_SYMBOLS; i++) {
        int x = (data[i]>>1) * (data[i]&1 ? 1 : -1);
        con_printf("%3d ", x);
    }
    con_printf("\r\n");
}