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
//g++ appsrc.cpp $(pkg-config --libs --cflags gstreamer-1.0 osmesa gstreamer-rtsp-server-1.0) -o appsrc | |
// based on https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc.c | |
// LICENSE: GPLv2 | |
#include <gst/gst.h> | |
#include <gst/rtsp-server/rtsp-server.h> | |
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
//compile using g++ -std=c++17 main.cpp uuid.cpp -luuid -o utest -O3 | |
#include "uuid.hpp" | |
#include <iostream> | |
using namespace horizon; | |
int main(void) { | |
UUID r; |
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
diff --git schematic/sheet.cpp schematic/sheet.cpp | |
index 94b7c1a..f816d2d 100644 | |
--- schematic/sheet.cpp | |
+++ schematic/sheet.cpp | |
@@ -67,7 +67,12 @@ namespace horizon { | |
const json &o = j["net_lines"]; | |
for (auto it = o.cbegin(); it != o.cend(); ++it) { | |
auto u = UUID(it.key()); | |
- net_lines.emplace(std::make_pair(u, LineNet(u, it.value(), this))); | |
+ try { |
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
import socket | |
from gi.repository import GObject, GLib | |
#based on http://rox.sourceforge.net/desktop/node/413.html | |
def handler(conn, flags, sock): | |
'''Asynchronous connection handler. Processes each line from the socket.''' | |
line = sock.recv(4096) | |
if not len(line): | |
print("Connection closed.") |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
#include <MSP430.h> | |
#include <MSP430_EnergyTrace.h> | |
#include <MSP430_Debug.h> | |
typedef struct __attribute__((packed)) { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.