Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Ihkudaa

celeron55 celeron55

💭
Ihkudaa
View GitHub Profile
View gist:cfbf4d3b51cf3603e3d698c78e371a7e
[root@everything log]# tail -n 1000 /var/log/nginx_access.log | grep forum.minetest.net | cut -d' ' -f1 | cut -d'.' -f1,2 | sort | uniq -c | sort -n
1 179.209
1 220.181
1 23.250
1 24.150
1 35.202
2 174.127
2 179.96
2 54.236
2 69.221
View hallo.js
/* Generated by the Nim Compiler v1.0.6 */
/* (c) 2019 Andreas Rumpf */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
View hallo.js
/* Generated by the Nim Compiler v1.0.6 */
/* (c) 2019 Andreas Rumpf */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
View gist:c8d959caa043bdcd2eb509ee015c93f8
/* Generated by the Nim Compiler v1.0.6 */
/* (c) 2019 Andreas Rumpf */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
View gist:c37710ee673747e157b687a37c28b03e
------Addition of New Official Games to Minetest------
The following criteria should be met by any game before it is considered for inclusion as an official game for Minetest:
1. Playable.
To be assessed by testers. See Testing section below.
2. Enjoyable.
To be assessed by testers. See Testing section below.
View gist:d0251197e0dd132027b4851a25b8c86b
#define DISCHARGE_SOFT_LIMIT_LOWEST_A 10
#define DISCHARGE_SOFT_LIMIT_UPPER_CELL_VOLTAGE 3.6
#define DISCHARGE_SOFT_LIMIT_LOWEST_CELL_VOLTAGE 2.9
if(min_cell_v < DISCHARGE_SOFT_LIMIT_UPPER_CELL_VOLTAGE){
float factor = (min_cell_v - DISCHARGE_SOFT_LIMIT_LOWEST_CELL_VOLTAGE) / (DISCHARGE_SOFT_LIMIT_UPPER_CELL_VOLTAGE - DISCHARGE_SOFT_LIMIT_LOWEST_CELL_VOLTAGE);
if(factor < 0.0)
factor = 0.0;
if(factor > 1.0)
View gist:8dd226b8993e3d244787e11a623e483a
void update_bms_discharge_motor_torque_req_limit()
{
// Limit torque request according to bms_status.max_discharge_current_Ax10
if(bms_status.max_discharge_current_Ax10 < 2000){
// Calculate rough motor current limit based on motor speed, rail
// voltage and rail current limit
float speed_rpm = abs(inverter_status.speed / INVERTER_BITS_PER_RPM);
float rail_voltage = inverter_status.voltage / INVERTER_BITS_PER_VOLT;
float rail_current_per_motor_current = speed_rpm / 3000.0f;
float rail_current_limit = (float)bms_status.max_discharge_current_Ax10 / 10.0f;
View gist:2030082fd777a3ba58cab16f419b038c
Total 12 modules 266.03 V
* Module 1: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.2/24.1°C
* Module 2: (22.29) 3.73 3.73 3.70 3.79 3.73 3.73 V 24.3/24.0°C
* Module 3: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.0/23.9°C
* Module 4: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.9/24.0°C
* Module 5: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.8/23.7°C
* Module 6: (22.22) 3.73 3.74 3.73 3.72 3.71 3.71 V 23.8/23.7°C
* Module 7: (22.27) 3.73 3.73 3.73 3.73 3.73 3.73 V 24.0/23.9°C
* Module 8: (22.26) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.8/23.8°C
* Module 9: (22.28) 3.73 3.73 3.73 3.73 3.73 3.73 V 23.9/24.0°C
View gist:706f19e03640b30f7fd56d128c20b256
Total 1 modules 0.00 V
FAULT STATE ACTIVE
* Module 1: (0.00) 3.38 3.35 3.38 3.46 3.53 3.70 V -98.4/-89.3°C FAULTS: OV ALERTS: OT1
44.601s: 44.601s: INFO: Command: reg load overwrite
Overwriting module configuration registers
53.187s: 53.187s: INFO: Command: ls
Total 1 modules 20.96 V
* Module 1: (20.96) 3.39 3.36 3.39 3.47 3.52 3.63 V -83.1/-89.3°C
01m02.785s: 01m02.785s: INFO: Command: eprom write 1
Writing eprom of module number 1
View gist:548aa516b4c46dba9a886147ff875867
10:05:12 <+selleri> tuo laturi käskyttää EVSE-piuhasta releen kiinni vaikka sille ei syötä mitään can-viestejä
10:14:32 <+selleri> meneeköhän tuo johonkin failsafe-moodiin akkujännitteen ollessa nolla (kuten nyt on) ja se moodi
on sellainen että se yrittää ladata itsenäisesti
10:15:31 <+selleri> se ei kyllä nosta akulle jännitteen kuin 7 volttiin, ei vaikuta latausyritykseltä
10:15:55 <+selleri> ehkä se odottaa että akulla olisi joku jännite ja sitten lataisi jos on
10:16:15 <+selleri> ilman että se sanoo vikakoodia siitä että akun jännite on liian alhainen
10:18:17 <+selleri> se jännite liian matala -vikakoodi on määritelty manuaalissa tulevan "during normal charging"
10:18:25 <+selleri> ja ei ole vikakoodia joka tulisi latauksen alussa tai kun aiotaan ladata
10:18:45 <+selleri> eli ehkä se koodi voi tulla vasta sen jälkeen kun laturi on itsekseen päättänyt että nyt voi
ladata