Skip to content

Instantly share code, notes, and snippets.

View Langerz82's full-sized avatar

Joshua L Langerz82

View GitHub Profile
@Langerz82
Langerz82 / test.py
Last active January 5, 2023 22:50
EE-bluetooth-agent-test
#!/usr/bin/env python
import time
from bluetool import Bluetooth
if __name__ == "__main__":
bt = Bluetooth()
print('Scanning for available devices for 60 seconds, please wait...')
bt.start_scanning(60)
time.sleep(10)
@Langerz82
Langerz82 / test.py
Last active January 2, 2023 09:26
python test emuelec-bluetooth
#!/usr/bin/env python
import time
import logging
import sys
from bluetool import Bluetooth
logger = logging.getLogger(__name__)
if __name__ == "__main__":
@Langerz82
Langerz82 / coreelec-19.5-dmesg_fb_hdmi
Created December 19, 2022 11:34
dmesg for CoreELEC 19.5 fb hdmi
CoreELEC3:~ # dmesg | grep "fb\|hdmi"
[ 0.000000@0]d Kernel command line: rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive logo=osd1,loaded,0x3d800000,2160p60hz maxcpus=4 vout=2160p60hz,enable hdmimode=2160p60hz cvbsmode=576cvbs hdmitx= cvbsdrv=0 androidboot.firstboot=0 androidboot.fake_rom_size=16 fake_mem_size=2 jtag=apao quiet androidboot.hardware=amlogic androidboot.logo_mode=0 androidboot.serialno=FB19201334 mac=80:00:ff:05:75:dc androidboot.mac=80:00:ff:05:75:dc androidboot.slot_suffix=_a bootfromsd systemd.show_status=auto
[ 0.000000@0]d fb: osd1
[ 0.000000@0]d fb: loaded
[ 0.000000@0]d fb: 0x3d800000
[ 0.000000@0]d fb: 2160p60hz
[ 0.000000@0]d vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000@0]d fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000@0]d PCI I/O : 0xf
@Langerz82
Langerz82 / gptokeyb.sh
Created September 27, 2022 21:57
EmuELEC - packages/sx05re/tools/sysutils/gptokeyb/package.mk
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
PKG_NAME="gptokeyb"
PKG_VERSION="0a9005074b6355bab8bc10a72a8302204e692862"
PKG_ARCH="any"
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/EmuELEC/gptokeyb"
PKG_URL="$PKG_SITE.git"
PKG_DEPENDS_TARGET="toolchain SDL2 libevdev"
@Langerz82
Langerz82 / setres.sh
Created September 19, 2022 03:59
setres - fixes
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)
# Read the video output mode and set it for emuelec to avoid video flicking.
# This file sets the hdmi output and frame buffer to the argument in pixel width.
# Allowed argument example ./setres.sh 1080p60hz <-- For height 1080 pixels.
@Langerz82
Langerz82 / advmame.sh
Created September 17, 2022 05:13
EmuELEC - advmame.sh - Test for vertical sync fixes
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
. /etc/profile
CONFIG_DIR="/emuelec/configs/advmame"
export DISPLAY=:0
@Langerz82
Langerz82 / setres.sh
Created September 15, 2022 18:54
setres - latest
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)
# Read the video output mode and set it for emuelec to avoid video flicking.
# This file sets the hdmi output and frame buffer to the argument in pixel width.
@Langerz82
Langerz82 / isValidPath.js
Last active July 26, 2022 02:19
JavaScript - Node function - isValidPath: Checks a two-dimensional array ex: [[x1,y1],[x2,y2]] for validity against a collision map.
// TODO - Grid axis is not being checked properly.
isValidPath: function (grid, path) {
// Check collision from an axis, n1 to n2, n3 is for the other axis.
var c1to2on3 = function (n1,n2,n3,axis) {
log.info("c1to2on3 - n1:"+n1+",n2:"+n2+",n3:"+n3);
var isDec = (n3 % 1 == 0);
var n1f = Math.floor(n1), n2c = Math.ceil(n2);
var i1 = Math.min(n1f,n2c), i2 = Math.max(n1f,n2c);
if (n1f != n2c) {
var n3f=Math.floor(n3), n3c=Math.ceil(n3);
@Langerz82
Langerz82 / findEasyPath.js
Last active July 25, 2022 23:27
findEasyPath - Tries to see if Manhatten Distance paths have no collision.
// Tries to see if Manhatten Distance paths have no collision.
// @param grid - A two-dimensional array containing the y-axis and x-axis in that order.
// @param start - A single array of the start coordinate start[0]=x, start[1]=y.
// @param start - A single array of the end coordinate end[0]=x, end[1]=y.
//
var findEasyPath = function (grid, start, end) {
var ts = G_TILESIZE; // 16 units in each grid coordinate.
var sx, sy, ex, ey;
@Langerz82
Langerz82 / setres.sh
Last active September 24, 2022 09:32
EmuELEC - Set resolution file.
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2022-present Joshua L (https://github.com/Langerz82)
# Read the video output mode and set it for emuelec to avoid video flicking.
# This file sets the hdmi output and frame buffer to the argument in pixel width.
# Allowed argument example ./setres.sh 1080p60hz <-- For height 1080 pixels.