Skip to content

Commit

Permalink
Merge pull request #150 from USC-ACTLab/devBroadcasting
Browse files Browse the repository at this point in the history
Broadcast support
  • Loading branch information
tobbeanton authored Oct 11, 2016
2 parents 0840732 + 6493a3e commit 69b8d93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/hal/interface/syslink.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@
// Defined packet types
#define SYSLINK_GROUP_MASK 0xF0

#define SYSLINK_RADIO_GROUP 0x00
#define SYSLINK_RADIO_RAW 0x00
#define SYSLINK_RADIO_CHANNEL 0x01
#define SYSLINK_RADIO_DATARATE 0x02
#define SYSLINK_RADIO_CONTWAVE 0x03
#define SYSLINK_RADIO_RSSI 0x04
#define SYSLINK_RADIO_ADDRESS 0x05
#define SYSLINK_RADIO_GROUP 0x00
#define SYSLINK_RADIO_RAW 0x00
#define SYSLINK_RADIO_CHANNEL 0x01
#define SYSLINK_RADIO_DATARATE 0x02
#define SYSLINK_RADIO_CONTWAVE 0x03
#define SYSLINK_RADIO_RSSI 0x04
#define SYSLINK_RADIO_ADDRESS 0x05
#define SYSLINK_RADIO_RAW_BROADCAST 0x06

#define SYSLINK_PM_GROUP 0x10
#define SYSLINK_PM_SOURCE 0x10
Expand Down
6 changes: 6 additions & 0 deletions src/hal/src/radiolink.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ void radiolinkSyslinkDispatch(SyslinkPacket *slp)
ledseqRun(LINK_DOWN_LED, seq_linkup);
syslinkSendPacket(&txPacket);
}
} else if (slp->type == SYSLINK_RADIO_RAW_BROADCAST)
{
slp->length--; // Decrease to get CRTP size.
xQueueSend(crtpPacketDelivery, &slp->length, 0);
ledseqRun(LINK_LED, seq_linkup);
// no ack for broadcasts
} else if (slp->type == SYSLINK_RADIO_RSSI)
{
//Extract RSSI sample sent from radio
Expand Down

0 comments on commit 69b8d93

Please sign in to comment.