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 UartListener do | |
use GenServer | |
@serial_port "/dev/cu.usbserial-2210" # e.g., "/dev/ttyUSB0" | |
@baud_rate 115200 | |
# @ic7300_address "94" # Hexadecimal address of IC-7300 | |
# @controller_address "E0" # Hexadecimal address of the controller (PC) | |
# Client | |
def start_link(args) do |
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 UartListener do | |
use GenServer | |
@serial_port "/dev/cu.usbserial-2210" # e.g., "/dev/ttyUSB0" | |
@baud_rate 115200 | |
# @ic7300_address "94" # Hexadecimal address of IC-7300 | |
# @controller_address "E0" # Hexadecimal address of the controller (PC) | |
# Client | |
def start_link(args) do |
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 UartListener do | |
use GenServer | |
@serial_port "/dev/cu.usbserial-2210" # e.g., "/dev/ttyUSB0" | |
@baud_rate 115200 | |
# Client | |
def start_link(args) do | |
GenServer.start_link(__MODULE__, args, name: __MODULE__) | |
end |
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
odule RadioListener do | |
# use Circuits.UART | |
# when you use circuits.uart.enumerate there is an id | |
# which we could map to which module we want to use. | |
@serial_port "/dev/cu.usbserial-2210" # e.g., "/dev/ttyUSB0" | |
@baud_rate 115200 | |
@ic7300_address "94" # Hexadecimal address of IC-7300 | |
@controller_address "E0" # Hexadecimal address of the controller (PC) |
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
# A user can be a part of multiple teams and orgs. The OrgTeam | |
# table has user_id, organization_id and team_id | |
defmodule Conspyre.Customers do | |
import Ecto.Query | |
alias Conspyre.Repo | |
alias Conspyre.Customers.{Team, OrgTeam} | |
alias Conspyre.Users.User |
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
SENT: M122 | |
READ: X Y Z E | |
READ: Address 0 0 0 0 | |
READ: Enabled false false false false | |
READ: Set current 800 800 800 800 | |
READ: RMS current 795 795 795 795 | |
READ: MAX current 1121 1121 1121 1121 | |
READ: Run current 25/31 25/31 25/31 25/31 | |
READ: Hold current 12/31 12/31 12/31 12/31 | |
READ: CS actual 12/31 12/31 12/31 12/31 |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: darkice | |
# Required-Start: $remote_fs $syslog $network $named $time alsa-utils | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: darkice audio streamer | |
# Description: Darkice will take an ALSA audio input and send it to | |
# a streaming server. |
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
# darkice configuration file | |
[general] | |
duration = 0 # 0 means forever | |
bufferSecs = 10 # Internal buffer, 10 is good | |
reconnect = yes # reconnect if stream broken? default: yes | |
[input] |
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
ORSSerialRequest *request = | |
[ORSSerialRequest requestWithDataToSend:requestData | |
userInfo:nil | |
timeoutInterval:2.0 | |
responseEvaluator:^BOOL(NSData *inputData) { | |
if ([inputData length] != 8) return NO; | |
NSData *headerData = [inputData subdataWithRange:NSMakeRange(0, 4)]; | |
NSString *header = [[NSString alloc] initWithData:headerData encoding:NSASCIIStringEncoding]; | |
return [header isEqualToString:@"data"]; | |
}]; |
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
@preferencesWindowController = PreferencesWindow.alloc.initWithWindowNibName('PreferencesWindow') | |
@preferencesWindowController.window |
NewerOlder