This file contains hidden or 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
# rename from firmware.bin to projectname.bin | |
# | |
# platform.ini | |
# extra_scripts = pre:rename_bin.py | |
# | |
Import("env") | |
import os | |
project_name = os.path.basename(os.path.dirname(env["PROJECT_CONFIG"])) |
This file contains hidden or 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
/* | |
see also https://stackoverflow.com/questions/7315936/which-of-sprintf-snprintf-is-more-secure/35401865#35401865 | |
If you leave memory management to std::string, you don't have to free it yourself. | |
*/ | |
// Using template | |
#include <string> | |
template<typename ...Args> std::string formatString(const char* fmt, Args... args) | |
{ | |
size_t sz = snprintf(nullptr, 0U, fmt, args...); // calculate length |
This file contains hidden or 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
// JSR 310 | |
import java.time.LocalDateTime; | |
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
public class CheckJsr | |
{ | |
public static void test(String tstr, int y, int m, int d, int hh, int mm, int ss) | |
{ | |
System.out.println(tstr); |
This file contains hidden or 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
// std::string / ARDUINO String での 比較 | |
#include <cstdio> | |
#include <vector> | |
#include <algorithm> | |
#ifdef ARDUINO | |
# include <WString.h> | |
using string_t = String; | |
#else | |
# include <string> | |
using string_t = std::string; |
This file contains hidden or 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
espressif32@4.4.0 / @5.2.0 | |
Location string:POSIX tz string:StandardOffset:DSTOffset:[ ]OK,[X]NG:[ ]OK,[X}NG | |
<+0330> => 330 * 3600 = 1188000 NG! / 3 * 3600 + 30 * 60 = 12600 OK! | |
Africa/Abidjan: GMT0: 0: 0 [ ]:[ ] | |
Africa/Accra: GMT0: 0: 0 [ ]:[ ] | |
Africa/Addis_Ababa: EAT-3: -10800: 0 [ ]:[ ] | |
Africa/Algiers: CET-1: -3600: 0 [ ]:[ ] | |
Africa/Asmara: EAT-3: -10800: 0 [ ]:[ ] | |
Africa/Bamako: GMT0: 0: 0 [ ]:[ ] |
This file contains hidden or 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 | |
# | |
# Raise Version by semantics versioning for Arduino library | |
# | |
import os | |
import sys | |
import argparse | |
import re | |
import json |
This file contains hidden or 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
class Sprite : public ::LGFX_Sprite | |
{ | |
public: | |
explicit Sprite(::LovyanGFX* parent) : ::LGFX_Sprite(parent) {} | |
Sprite() : LGFX_Sprite() {} | |
template<typename T> | |
void pushPartial(LovyanGFX* dst, | |
const int32_t dx, const int32_t dy, | |
const int32_t width, const int32_t height, |
This file contains hidden or 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
class Sprite : public ::LGFX_Sprite | |
{ | |
public: | |
explicit Sprite(::LovyanGFX* parent) : ::LGFX_Sprite(parent) {} | |
Sprite() : LGFX_Sprite() {} | |
/*! | |
@brief Bit block transfer of color data corresponding to a pixel rectangle from the specified source sprite to the destination sprite. | |
@param dst Destination sprite. | |
@param dx X coodrdinate of the left-top corner of destination rectabgle. |
This file contains hidden or 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
/** | |
BasicHTTPSClient.ino | |
Created on: 14.10.2018 | |
*/ | |
#include <Arduino.h> | |
#include <WiFi.h> |
This file contains hidden or 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
// HDMI ケーブル未接続、 DCなしにも関わらず本体液晶にでない時のログ | |
15:01:41.443 > rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) | |
15:01:41.443 > configsip: 0, SPIWP:0xee | |
15:01:41.443 > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 | |
15:01:41.443 > mode:DIO, clock div:1 | |
15:01:41.443 > load:0x3fff0030,len:1344 | |
15:01:41.443 > load:0x40078000,len:13924 | |
15:01:41.443 > ho 0 tail 12 room 4 | |
15:01:41.443 > load:0x40080400,len:3600 |
OlderNewer