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 | |
[ -e "$1" ] || { printf "Must provide .elf as argument\n"; exit 1; } | |
printf "Paste your backtrace and press ctrl-d\n"; | |
sed -e 's/ /\n/g' | grep 0x | cut -d':' -f1 | xargs xtensa-esp32-elf-addr2line -pfiaC -e $1 | |
# Nominally, you _could_ autoconstruct which toolchain to use from | |
# the CONFIG_IDF_TARGET_ARCH and CONFIG_IDF_TARGET fields in sdkconfig... |
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
#!/usr/bin/env python3 | |
""" | |
Testing handling exceptions from threads inside asyncio | |
""" | |
import asyncio | |
import logging | |
import random | |
import threading | |
import time |
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
''' | |
SimpleSecureHTTPServer.py - simple HTTP server supporting SSL. | |
- replace fpem with the location of your .pem server file. | |
- the default port is 443. | |
usage: python SimpleSecureHTTPServer.py [server.pem] [port] | |
prereq: make a cert! | |
openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes |
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
--- /home/karlp/src/renode-git/platforms/cpus/stm32l151.repl 2020-09-11 10:16:06.627671941 +0000 | |
+++ /opt/renode/platforms/cpus/stm32l151.repl 2020-09-11 12:09:07.482336609 +0000 | |
@@ -77,7 +77,8 @@ | |
sysbus: | |
init: | |
- ApplySVD @https://dl.antmicro.com/projects/renode/svd/STM32L1xx.svd.gz | |
+ //ApplySVD @https://dl.antmicro.com/projects/renode/svd/STM32L1xx.svd.gz | |
+ ApplySVD @https://raw.githubusercontent.com/posborne/cmsis-svd/master/data/STMicro/STM32L1xx.svd | |
Tag <0x4000280C, 0x40002810> "RTC_ISR" 0x60 |
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
$ ./rmw | |
set: from initial: 0xffffffff, setting mode: 6 => 0xffff6fff | |
set2: from initial: 0xffffffff, setting mode: 6 => 0xffff6fff | |
set: from initial: 0, setting mode: 6 => 0 <<<< failed to set properly. | |
set2: from initial: 0, setting mode: 6 => 0x6000 |
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 RELEASE-VERSION | |
include version.py | |
# Anything else you normally use | |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.js" type="text/javascript"></script> | |
<script> | |
client = new Paho.MQTT.Client("somehost", 8083, "clientId"); | |
client.onConnectionLost = onConnectionLost; | |
client.onMessageArrived = onMessageArrived; | |
client.connect({onSuccess:onConnect}); | |
function onConnect() { |
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
-- DHT22 to MQTT Publisher | |
-- Andrew Elwell, 2016-06-08 | |
client='ESP-'..node.chipid() | |
m = mqtt.Client(client, 60) | |
m:lwt("status/"..client, "offline", 0, 1) | |
m:connect("10.1.1.251", 1883, 0, 1, function(hohoho) | |
print("connected") | |
hohoho:publish(string.format("status/%s", client, 0, 1)) |
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
module("luci.controller.rme.jquery", package.seeall) | |
local http = require("luci.http") | |
local protocol = require("luci.http.protocol") | |
local json = require("luci.json") | |
function index() | |
entry({'karl', 'modbus_devices'}, call("action_modbus_devices"), "Modbus Devices", 20).dependent=false | |
end | |
function kkdumpt(tt, label) |
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
#!/usr/bin/python | |
# script to poll growatt PV inverter and spit out values | |
# Andrew Elwell <Andrew.Elwell@gmail.com> 2013-09-01 | |
import ConfigParser | |
from pymodbus.client.sync import ModbusSerialClient as ModbusClient | |
import time | |
import mosquitto |
NewerOlder