Skip to content

Instantly share code, notes, and snippets.

@amcjen
Created March 6, 2014 00:18
Show Gist options
  • Save amcjen/9379572 to your computer and use it in GitHub Desktop.
Save amcjen/9379572 to your computer and use it in GitHub Desktop.
char leadAnnounceSig[256];
static void leadAnnouncementSend(uint16_t group, uint16_t from, char *message) {
// reports are expected to be json objects
if (group == 0xBEEF) {
sprintf(leadAnnounceSig, "{\"type\":\"report\",\"from\":%d,\"report\":%s}\n", from, report2json(message));
}
if (group == 0) {
sprintf(leadAnnounceSig, "{\"type\":\"announce\",\"from\":%d,\"announce\":%s}\n", from, message);
}
leadSignal(leadAnnounceSig);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment