Created
March 6, 2014 00:18
-
-
Save amcjen/9379572 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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