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
--- /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
<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
--[[ | |
just tries to parse the json posted and reply ok/NAK | |
--]] | |
module("luci.controller.rme.demo", package.seeall) | |
local http = require("luci.http") | |
local protocol = require("luci.http.protocol") | |
local json = require("dkjson") | |
--local json = require("luci.json") | |
function index() |
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 <[email protected]> 2013-09-01 | |
import ConfigParser | |
from pymodbus.client.sync import ModbusSerialClient as ModbusClient | |
import time | |
import mosquitto |
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 python | |
from __future__ import division | |
import collections | |
import logging | |
import math | |
import random | |
import string | |
import time |
NewerOlder