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
/* This is a concatenation of the following files from | |
https://github.com/Seeed-Studio/Grove_LED_Bar (LGPL): | |
- Grove_LED_Bar.h | |
- Grove_LED_Bar.cpp (less the #include for the above header) | |
and the code from | |
https://www.hackster.io/karel/grove-led-bar-controller-with-the-bean-c3b81e | |
(less the #include for the above header) with corrections from the | |
comments. */ | |
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
defmodule GCM.Pusher do | |
use GenStage | |
# The maximum number of requests Firebase allows at once per XMPP connection | |
@max_demand 100 | |
defstruct [ | |
:producer, | |
:producer_from, | |
:fcm_conn_pid, | |
:pending_requests, |
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
defmodule GCM.PushCollector do | |
use GenStage | |
# Client | |
def push(pid, push_requests) do | |
GenServer.cast(pid, {:push, push_requests}) | |
end | |
# Server |
OlderNewer