repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
mincrmatt12/MSign
esp/main/dupm.h
#ifndef MSN_DUPM_H #define MSN_DUPM_H #include <FreeRTOS.h> #include <task.h> #include <queue.h> #include <type_traits> #include "common/bheap.h" #include "common/heapsize.h" #include "common/slots.h" namespace serial { struct DataUpdateRequest { enum : uint16_t { // sent from servicer as packets TypeSet...
mincrmatt12/MSign
stm/src/color.h
#ifndef MSN_COLOR_H #define MSN_COLOR_H #include <stdint.h> #include <utility> #include <algorithm> namespace led { struct color_t { constexpr color_t(uint16_t r, uint16_t g, uint16_t b) : r(r), g(g), b(b) {} constexpr color_t() : r(0), g(0), b(0) {} constexpr color_t(uint16_t gray) : r(gray), g(gray), b(g...
mincrmatt12/MSign
sim/src/esp/esp_log.c
// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
mincrmatt12/MSign
stm/src/pins.h
<reponame>mincrmatt12/MSign<gh_stars>1-10 #ifndef PINS_H #define PINS_H // Define a bunch of names depending on the active build target #ifdef STM32F207xx #define ESP_USART USART6 #define ESP_USART_Port GPIOG #define ESP_USART_TX LL_GPIO_PIN_14 #define ESP_USART_RX LL_GPIO_PIN_9 #define ESP_USART_IRQ_NAME USART6_IR...
mincrmatt12/MSign
esp/main/serial.h
#ifndef SERIAL_H #define SERIAL_H #include <stdint.h> #include <stddef.h> #include "common/slots.h" #include "common/bheap.h" #include "common/heapsize.h" #include "dupm.h" #include "protocol.h" #include <type_traits> #include <FreeRTOS.h> #include <task.h> #include <queue.h> namespace serial { struct SerialInterf...
mincrmatt12/MSign
stm/src/common/bootcmd.c
#include "bootcmd.h" // really just present here to check for STM and i couldn't be bothered to add a define #if (defined(STM32F205xx) || defined(STM32F207xx)) && !defined(SIM) #include "stm32f2xx_ll_rtc.h" #include "stm32f2xx_ll_pwr.h" #include "stm32f2xx_ll_rcc.h" #include "stm32f2xx_ll_bus.h" void bootcmd_init() {...
mincrmatt12/MSign
stm/src/common/bheap.h
<reponame>mincrmatt12/MSign<filename>stm/src/common/bheap.h<gh_stars>1-10 #ifndef MSN_BHEAP_H #define MSN_BHEAP_H #include <stdint.h> #include <string.h> #include <type_traits> #include <iterator> #include "lru.h" #if __cpp_inline_variables >= 201603 #define MSN_BHEAP_INLINE_V const inline static #else #define MSN_B...
mincrmatt12/MSign
stm/src/screens/clock.h
<gh_stars>1-10 #ifndef CLOCK_S_H #define CLOCK_S_H #include "base.h" #include "../matrix.h" #include <stdint.h> namespace screen { struct ClockScreen : public Screen { ClockScreen(); void draw(); private: led::color_t bg_color; }; } #endif
mincrmatt12/MSign
esp/main/dwhttp.h
#ifndef MSE_UTIL_H #define MSE_UTIL_H #include <string.h> #include <stdint.h> #include <stdio.h> #include <functional> #define MAX_LOG_FILE_SIZE 64 * 1024 * 1024 namespace dwhttp { /* TODO: nothing uses this right now struct RawDownload { int16_t status_code; char * buf; uint32_t length; bool error; }; ...
mincrmatt12/MSign
stm/src/nvic.h
#ifndef NVIC_H #define NVIC_H namespace nvic { void init(); } #endif
mincrmatt12/MSign
esp/main/upd.h
#ifndef UPD_H #define UPD_H namespace upd { enum UpdateKind { FULL_SYSTEM = 0x01, WEB_UI, CERTIFICATE_FILE, NO_UPDATE = 0x00 }; UpdateKind needed(); // is an update needed, based on the state of the SD card void update_cacerts(); void update_website(); void update_system(); } #endif /* ifndef UPD_H ...
mincrmatt12/MSign
stm/src/screens/threed/fixed.h
#ifndef MSN_FXDMATH_H #define MSN_FXDMATH_H #include <stdint.h> #include <stddef.h> #include "../../intmath.h" #include <bit> // m for math namespace threed::m { struct fixed_t { const static size_t Fac = 15; constexpr static int32_t Mul = (1 << Fac); int32_t value; constexpr fixed_t(int non_fixed) : value...
mincrmatt12/MSign
esp/main/webui.cfg.h
namespace webui { enum struct WebuiMode { DISABLED, LOCAL, PROXIED }; //!cfg: holds .webui.mode, default webui::WebuiMode::LOCAL extern WebuiMode mode; //!cfg: holds .webui.login.user, default "admin" extern const char * login_user; //!cfg: holds .webui.login.password, default "<PASSWORD>" extern const...
mincrmatt12/MSign
esp/main/grabber/grab.h
<gh_stars>1-10 #ifndef MSN_GRAB_H #define MSN_GRAB_H #include <FreeRTOS.h> #include "../common/slots.h" namespace grabber { // Start the timer that ensure grabber is running when requested. void start(); struct Grabber { void (*init_func)(){}; bool (*grab_func)(){}; // returns true for normal timeout, false f...
mincrmatt12/MSign
esp/main/grabber/transit/common.cfg.h
<filename>esp/main/grabber/transit/common.cfg.h #pragma once namespace transit { enum TransitImplementation { NONE, TTC, GTFS }; //!cfg: holds .transit_implementation, default transit::TTC extern TransitImplementation impl; enum TransitDirectionCode : char { NA = '\x00', WEST = 'W', EAST = 'E', N...
mincrmatt12/MSign
esp/main/wifitime.h
#ifndef WIFI_H #define WIFI_H #include <FreeRTOS.h> #include <portmacro.h> #include <event_groups.h> namespace wifi { bool init(); extern EventGroupHandle_t events; uint64_t get_localtime(); uint64_t millis_to_local(uint64_t millis); enum Events : EventBits_t { WifiConnected = 1, TimeSynced = 2, StmConne...
mincrmatt12/MSign
stm/src/common/slots.h
#ifndef SLOTS_H #define SLOTS_H #include <stdint.h> #include <string.h> namespace slots { // The comments here are important, as they get parsed by the dissector. // They _must_ be in the format // <type>; [optionalparameter] (stuff) // or // '' // to indicate the same as previous // the structs with flags mus...
mincrmatt12/MSign
stm/src/srv.h
<filename>stm/src/srv.h #ifndef SRV_H #define SRV_H #include <stdint.h> #include <type_traits> #include "common/slots.h" #include "protocol.h" #include "common/bheap.h" #include "common/heapsize.h" #include <FreeRTOS.h> #include <stream_buffer.h> #include <semphr.h> #include <queue.h> #include <task.h> namespace srv...
mincrmatt12/MSign
stm/src/tasks/timekeeper.h
#ifndef TIMEKEEPER_H #define TIMEKEEPER_H #include <stdint.h> namespace tasks { struct Timekeeper { Timekeeper(uint64_t &timestamp) : timestamp(timestamp) { } void loop(); void systick_handler(); // Current time; as in the systick time. Useful if you don't want the clock going backwards when the ESP u...
mincrmatt12/MSign
stm/src/common/bootcmd.h
#ifndef BOOTCMD_H #define BOOTCMD_H #include <stdint.h> #include <stdbool.h> #ifdef __cplusplus extern "C" { #endif void bootcmd_init(); enum _bootcmd_t { BOOTCMD_RUN = 0x00ull, BOOTCMD_UPDATE = 0x01, BOOTCMD_NEW_LOADER = 0x02 }; typedef enum _bootcmd_t bootcmd_t; bool bootcmd_did_just_update(); bootcmd_t bootc...
mincrmatt12/MSign
esp/components/libb64/include/b64/ccommon.h
/* ccommon.h - common header for encoding and decoding algorithm This is part of the libb64 project, and has been placed in the public domain. For details, see http://sourceforge.net/projects/libb64 */ #ifndef BASE64_CCOMMON_H #define BASE64_CCOMMON_H #define BASE64_VER_MAJOR 2 #define BASE64_VER_MINOR 0 #endif /* B...
mincrmatt12/MSign
stm/src/crash/decode.h
<filename>stm/src/crash/decode.h #ifndef MSN_CRASH_DECODE_H #define MSN_CRASH_DECODE_H #include <stddef.h> #include <stdint.h> namespace crash::decode { constexpr inline size_t max_length_size = 100; void fill_backtrace(uint32_t backtrace[], uint16_t &backtrace_length, uint32_t PC, uint32_t LR, uint32_t SP); void...
mincrmatt12/MSign
esp/main/grabber/modelserve.h
<reponame>mincrmatt12/MSign<filename>esp/main/grabber/modelserve.h<gh_stars>1-10 #ifndef MSIGN_MSR_H #define MSIGN_MSR_H #include "grab.h" namespace modelserve { void init(); bool loop(); // Every 200 seconds (or 3m20 seconds) we change the model constexpr static auto modelserve_grabber = grabber::make_refreshab...
mincrmatt12/MSign
stm/src/fonts/dejavu_8.h
#ifndef FONT_DEJAVUSANS_8_H #define FONT_DEJAVUSANS_8_H namespace font::dejavusans_8 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf #endif
mincrmatt12/MSign
stm/src/common/lru.h
<filename>stm/src/common/lru.h #ifndef LRU_H #define LRU_H #include <stdint.h> #include <stddef.h> #include <type_traits> namespace lru { template<size_t Buckets, size_t ChainLength> struct Cache { static_assert(!(Buckets & (Buckets - 1)), "Buckets must be power of two"); bool contains(uint16_t key) const { ...
mincrmatt12/MSign
stm/src/common/heapsize.h
#pragma once #define ESP_HEAP_SIZE (15*1024) #define STM_HEAP_SIZE (13*1024)
mincrmatt12/MSign
esp/main/protocol.h
#ifndef MSN_PROTOCOL_H #define MSN_PROTOCOL_H // Re-pluggable protocol layer: // // Contains simple functions to wait for a packet header and wait for packet body. #include <stdint.h> #include <FreeRTOS.h> #include <task.h> #include "common/slots.h" namespace protocol { struct ProtocolImpl { void init_hw(); // S...
mincrmatt12/MSign
stm/src/fonts/latob_11.h
#ifndef FONT_LATO_BOLD_11_H #define FONT_LATO_BOLD_11_H namespace font::lato_bold_11 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /usr/share/fonts/truetype/lato/Lato-Bold.ttf #endif
mincrmatt12/MSign
sim/src/esp/esp_system.h
<gh_stars>1-10 #ifndef ESP_SYSTEM_FAKE #define ESP_SYSTEM_FAKE #define heap_caps_get_free_size(x) 10000 #define esp_get_free_heap_size() 10000 #include <stdlib.h> #include <stddef.h> static void esp_restart() { exit(1); } static void esp_fill_random(void *buf, size_t len) {} #define esp_random random #define IRAM...
mincrmatt12/MSign
stm/src/tasks/debug.h
<reponame>mincrmatt12/MSign #ifndef MSS_DEBUG_H #define MSS_DEBUG_H #include <stdint.h> #include "timekeeper.h" namespace tasks { struct DebugConsole { DebugConsole(Timekeeper &tim) : tim(tim) { } void run(); private: Timekeeper& tim; }; } #endif
mincrmatt12/MSign
esp/main/grabber/sccfg.h
#ifndef MSIGN_SC_H #define MSIGN_SC_H #include "grab.h" #include "../common/slots.h" namespace sccfg { // This is both a grabber and module for other grabbers to tie into. void init(); bool loop(); void set_force_disable_screen(slots::ScCfgInfo::EnabledMask e, bool on); void set_force_enable_screen(slots::ScCfg...
mincrmatt12/MSign
stm/src/screens/threed.h
<gh_stars>1-10 #ifndef THREED_H #define THREED_H #include <stdint.h> #include "../draw.h" #include "base.h" #include <string.h> #include <cmath> #include "../common/slots.h" #include "threed/fixed.h" namespace threed { struct Vec3 { m::fixed_t x, y, z; constexpr Vec3() : ...
mincrmatt12/MSign
stm/src/fonts/lcdpixel_6.h
#ifndef FONT_LCDPIXEL_6_H #define FONT_LCDPIXEL_6_H namespace font::lcdpixel_6 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /home/matthew/projects/stm32-leds/bmap/testfnt/build/lcdpixel.bdf #endif
mincrmatt12/MSign
stm/src/crash/rtos.h
#ifndef MSN_CRASH_RTOS_H #define MSN_CRASH_RTOS_H #include <stdint.h> namespace crash::rtos { // Try to figure out the active thread name _safely_, otherwise return null. const char * guess_active_thread_name(); // Is the RTOS active? bool is_rtos_running(); void get_task_regs(uint32_t *topofstack, uint32_t& P...
mincrmatt12/MSign
stm/src/crash/simplematrix.h
<gh_stars>1-10 #ifndef SIMPLMATRIX_H #define SIMPLMATRIX_H #include "../gpio.h" #include <stdint.h> #include <string.h> #include "stm32f2xx.h" #include "stm32f2xx_ll_tim.h" #include "stm32f2xx_ll_bus.h" #include "stm32f2xx_ll_gpio.h" #include "stm32f2xx_ll_dma.h" #include "../pins.h" namespace crash { // Lookup tabl...
mincrmatt12/MSign
sim/src/stm/crash/main.h
#ifndef MSN_SIM_CRASH_H #define MSN_SIM_CRASH_H namespace crash { [[noreturn]] void panic(const char* errcode); [[noreturn]] void panic_nonfatal(const char* errcode); }; #endif
mincrmatt12/MSign
esp/main/config.h
<gh_stars>1-10 #ifndef CONFIG_H #define CONFIG_H #include <stdint.h> #include "json.h" namespace config { // Slightly less posessive unique_ptr, "lazy" as in "lazily allocated" template<typename T> struct lazy_t { const T* get() const {return ptr;} const T* get(const T& def) const {return (*this) ? get() : def...
mincrmatt12/MSign
stm/src/crash/mindraw.h
#ifndef MSN_MINDRAW_H #define MSN_MINDRAW_H // bare minimum draw functions #include <stdint.h> #include "simplematrix.h" namespace crash::draw { // Draw a bitmap image to the framebuffer. Mirroring is based on bit ordering. void bitmap(Matrix &fb, const uint8_t * bitmap, uint8_t width, uint8_t height, uint8_t strid...
mincrmatt12/MSign
stm/src/fonts/dejavu_12.h
<reponame>mincrmatt12/MSign #ifndef FONT_DEJAVUSANS_12_H #define FONT_DEJAVUSANS_12_H namespace font::dejavusans_12 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf #endif
mincrmatt12/MSign
stm/src/tskmem.h
<reponame>mincrmatt12/MSign #ifndef MSN_TSKMEM_H #define MSN_TSKMEM_H #include <FreeRTOS.h> #include <task.h> namespace tskmem { template<size_t Stack> struct TaskHolder { TaskHandle_t create( TaskFunction_t code_ptr, const char * const name, void * const parameter, UBaseType_t priority ) { r...
mincrmatt12/MSign
sim/src/stm/stm32f2xx_ll_usart.h
<reponame>mincrmatt12/MSign // mock various ll_usart calls #include "pins.h" #ifndef MOCK_USART_H #define MOCK_USART_H void LL_USART_ClearFlag_ORE(void *) {}; void LL_USART_ClearFlag_PE(void *) {}; #define ESP_USART nullptr #endif
mincrmatt12/MSign
stm/src/fonts/vera_8.h
<gh_stars>1-10 #ifndef FONT_VERA_8_H #define FONT_VERA_8_H namespace font::vera_8 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf #endif
mincrmatt12/MSign
stm/src/common/util.h
#ifndef MSN_UTIL_H #define MSN_UTIL_H #include <stddef.h> #include <stdint.h> namespace util { uint16_t compute_crc(uint8_t * buffer, size_t length, uint16_t crc_previous=0); bool crc_valid(uint8_t * buffer, size_t length_including_crc); }; #endif
mincrmatt12/MSign
esp/main/grabber/transit/ttc.h
#ifndef TTC_H #define TTC_H #include "../grab.h" namespace transit::ttc { void init(); bool loop(); // There's no rate limit so.... constexpr static auto ttc_grabber = grabber::make_refreshable_grabber( grabber::make_https_grabber(init, loop, pdMS_TO_TICKS(45000)), slots::protocol::GrabberID::TRANSIT ); }...
mincrmatt12/MSign
stm/src/fonts/tahoma_9.h
#ifndef FONT_TAHOMA_9_H #define FONT_TAHOMA_9_H namespace font::tahoma_9 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /home/matthew/Downloads/tahoma.ttf #endif
mincrmatt12/MSign
esp/main/utf.h
#ifndef MSN_UTF_H #define MSN_UTF_H // Very minimal UTF8 parser and Unicode "normalizer": converts a few select utf8-encoded unicode codepoints to normal ascii. namespace utf8 { void process(char * str_in_out); }; #endif
mincrmatt12/MSign
stm/src/rng.h
#ifndef RNG_H #define RNG_H #include <stdint.h> namespace rng { void init(); uint32_t get(); uint16_t getclr(); } #endif
mincrmatt12/MSign
stm/src/screens/weather.h
#ifndef WEATHER_H #define WEATHER_H #include "base.h" #include <stdint.h> #include "../common/slots.h" namespace screen { struct WeatherScreen : public Screen { WeatherScreen(); ~WeatherScreen(); static void prepare(bool); void draw(); void refresh(); bool interact(); private: void draw_currentstat...
mincrmatt12/MSign
esp/main/wifitime.cfg.h
namespace wifi { //!cfg: receives .wifi.conn.$field void receive_config(const char *field, const char *value); //!cfg: holds .time.zone, default "EST5EDT,M3.2.0/2:00:00,M11.1.0/2:00:00" extern const char * time_zone_str; //!cfg: holds .time.server, default "pool.ntp.org" extern const char * time_server; }
mincrmatt12/MSign
esp/main/grabber/transit/ttc.cfg.h
#include <stddef.h> #include <stdint.h> #include "../../config.h" #include "./common.cfg.h" namespace transit::ttc { //!cfg: holds .ttc.alert_search extern const char * alert_search; //!cfg: holds .ttc.agency_code, default "ttc" extern const char * agency_code; //!cfg: receives .ttc.entries[$n].name void updat...
mincrmatt12/MSign
sim/src/stm/gpio.h
<filename>sim/src/stm/gpio.h #ifndef GPIO_H #define GPIO_H #include <stdint.h> namespace gpio { template<uint32_t Port, uint32_t Mask> struct Pin { inline Pin& operator=(const bool& on) { return *this; } }; } #endif
mincrmatt12/MSign
esp/main/grabber/cfgpull.h
#ifndef MSIGN_CFGPL_H #define MSIGN_CFGPL_H #include "grab.h" namespace cfgpull { void init(); bool loop(); // Check every 5 minutes for a new config update constexpr static auto cfgpull_grabber = grabber::make_refreshable_grabber( grabber::make_https_grabber(init, loop, pdMS_TO_TICKS(5*60*1000)), slots::p...
mincrmatt12/MSign
stm/src/protocol.h
#ifndef PROTOCOL_H #define PROTOCOL_H #include "common/slots.h" #include <stdint.h> #include <FreeRTOS.h> #include <task.h> namespace srv { enum struct ProtocolState { UNINIT, HANDSHAKE_RECV, HANDSHAKE_SENT, UPDATE_STARTING, DMA_WAIT_SIZE, DMA_GOING }; // Actually does the UART comms with the ESP str...
mincrmatt12/MSign
stm/src/screens/base.h
<reponame>mincrmatt12/MSign #ifndef MSN_SCREEN_BASE_H #define MSN_SCREEN_BASE_H #include <utility> #include <tuple> #include <stdint.h> #include <stddef.h> #include "../ui.h" namespace screen { // Override these (and the destructor/constructor); not virtual because we use a tagged union struct Screen { // Set ne...
mincrmatt12/MSign
esp/main/sd.h
<gh_stars>1-10 #ifndef MSN_SD_H #define MSN_SD_H #include <ff.h> #include <FreeRTOS.h> #include <stream_buffer.h> namespace sd { enum struct InitStatus { Ok, NoCard, FormatError, UnusableCard, UnkErr }; // Sets up FatFS with this. InitStatus init(); void init_logger(); void log_putc(char c); exter...
mincrmatt12/MSign
esp/main/grabber/cfgpull.cfg.h
<gh_stars>1-10 #include <stdint.h> #include "../config.h" namespace cfgpull { //!cfg: holds .cfgpull.enabled, default false extern bool enabled; //!cfg: holds .cfgpull.only_firm, default false extern bool only_firm; //!cfg: holds .cfgpull.host extern const char * pull_host; //!cfg: holds .cfgpull.secret ext...
mincrmatt12/MSign
stm/src/rcc.h
<filename>stm/src/rcc.h #ifndef RCC_H #define RCC_H namespace rcc { void init(); } #endif
mincrmatt12/MSign
sim/src/stm/matrix.h
#ifndef MATRIX_H #define MATRIX_H #include "gpio.h" #include <stdint.h> #include <string.h> #include <iostream> #include <chrono> #include <cmath> #include <FreeRTOS.h> #include <task.h> #include "tskmem.h" #include "color.h" namespace led { template<uint16_t Width, uint16_t Height> struct FrameBuffer { Frame...
mincrmatt12/MSign
stm/src/fonts/latob_15.h
#ifndef FONT_LATO_BOLD_15_H #define FONT_LATO_BOLD_15_H namespace font::lato_bold_15 { extern const void * const info[4]; // metrics, data, pointer to kern_size, kerning } // generated by fnter w/ /usr/share/fonts/truetype/lato/Lato-Bold.ttf #endif
mincrmatt12/MSign
stm/src/gpio.h
#ifndef GPIO_H #define GPIO_H #include "stm32f2xx.h" #include "stm32f2xx_ll_gpio.h" #include <stdint.h> namespace gpio { template<uint32_t Port, uint32_t Mask> struct Pin { inline Pin& operator=(const bool& on) { if (on) { ((GPIO_TypeDef *)Port)->BSRR |= (1 << Mask); } else { ((GPIO_TypeDef *)Por...
mincrmatt12/MSign
stm/src/system.c
#include <sys/stat.h> #include <errno.h> #include <sys/types.h> #include <FreeRTOSConfig.h> int __attribute__((used)) _close(int file) {return -1;} int __attribute__((used)) _fstat(int file, struct stat *st) { st->st_mode = S_IFCHR; return 0; } int __attribute__((used)) _isatty(int file) {return 1;} int __attribut...
mincrmatt12/MSign
stmboot/src/main.c
#include <stm32f2xx.h> #include "common/bootcmd.h" #include <stdbool.h> #include "string.h" // BOOTLOADER REVISION CONSTANT const char BL_REV[4] = {'2', 'b', 0, 0}; extern const void * _sirtext; extern void * _srtext, *_ertext; #define RAMFUNC __attribute__((section(".rtext"))) #define FLASH_KEY1 <KEY> #define FLASH...
mincrmatt12/MSign
stm/src/screens/ttc.h
<filename>stm/src/screens/ttc.h #ifndef TTC_H #define TTC_H #include "base.h" #include <stdint.h> #include "../common/bheap.h" namespace screen { struct TTCScreen : public Screen { TTCScreen(); ~TTCScreen(); static void prepare(bool); void draw(); void refresh(); private: void draw_bus(); // Draw a...
mincrmatt12/MSign
esp/main/grabber/modelserve.cfg.h
//!cfg: include ../common/slots.h #include "../common/slots.h" namespace modelserve { struct ModelParams { //!cfg: holds .cam.focuses slots::Vec3 focuses[3]; //!cfg: holds .cam.min slots::Vec3 minpos; //!cfg: holds .cam.max slots::Vec3 maxpos; enum LightingMode : uint8_t { BAKED, DYNAMIC }; ...
mincrmatt12/MSign
esp/main/grabber/sccfg.cfg.h
<reponame>mincrmatt12/MSign #include "../config.h" #include "../common/slots.h" #include <stdint.h> namespace sccfg { const inline uint8_t number_of_screens = 3; struct ScreenEntry { struct OnOffTime { //!cfg: holds .start int32_t start = 0; //!cfg: holds .end int32_t end = -1; bool always_on() c...
mincrmatt12/MSign
esp/main/grabber/weather.h
#ifndef WEATHER_H #define WEATHER_H #include "grab.h" namespace weather { void init(); bool loop(); // Rate limit is 1000/day, so we use a conservative 5 minutes constexpr static auto weather_grabber = grabber::make_refreshable_grabber( grabber::make_https_grabber(init, loop, pdMS_TO_TICKS(60*5*1000), pdMS_TO_...
mincrmatt12/MSign
esp/main/grabber/weather.cfg.h
<gh_stars>1-10 namespace weather { //!cfg: holds .weather.key extern const char * api_key; //!cfg: holds .weather.coord[0] extern float lat; //!cfg: holds .weather.coord[1] extern float lon; }
mincrmatt12/MSign
stm/src/intmath.h
#ifndef INTMATH_H #define INTMATH_H #include <stdint.h> #include <type_traits> namespace intmath { // Round to nearest 10^N and divide. // // round10(453, 100) --> 4.53 --> [5] // | | // | \-------\ // | | // \-- = 4.53 * 100 template<typename T> constexpr T r...
mincrmatt12/MSign
sim/src/stm/stm32f2xx_ll_system.h
#ifndef MOCK_SYSTEM_H #define MOCK_SYSTEM_H #include <stdint.h> #include <unistd.h> extern char ** orig_argv; [[noreturn]] inline void NVIC_SystemReset() { exit(0); while (1) {;} } #define SET_BIT(REG, BIT) ((REG) |= (BIT)) #define CLEAR_BIT(REG, BIT) ((REG) &= ~(BIT)) #define READ_BIT(REG, BIT) ((REG)...
mincrmatt12/MSign
stm/src/screens/threed/mesh.h
<reponame>mincrmatt12/MSign // count = 168 #include "../threed.h" namespace threed { struct DefaultMeshHolder { Tri tris[168]; const static inline size_t tri_count = 168; constexpr DefaultMeshHolder() : tris{} { tris[0] = { { m::fixed_t{-17696, nullptr}, m::fixed_t{9868, nullptr}, m::fixed_t{-41716, nullptr} }, ...
mincrmatt12/MSign
esp/main/grabber/transit/gtfs.h
#ifndef GTFS_H #define GTFS_H #include "../grab.h" namespace transit::gtfs { void init(); bool loop(); // Update every minute constexpr static auto gtfs_grabber = grabber::make_refreshable_grabber( grabber::make_https_grabber(init, loop, pdMS_TO_TICKS(90*1000)), slots::protocol::GrabberID::TRANSIT ); } #...
mincrmatt12/MSign
stm/src/ui.h
#ifndef MSN_UIB_H #define MSN_UIB_H #include <stdint.h> #include <FreeRTOS.h> namespace ui { extern struct Buttons { // setup gpios void init(); // Load new values from esp/buttons void update(); enum Button { POWER = 0, // PA0 NXT = 10, PRV = 9, SEL = 8, MENU = 7, EXT1 = 6, EXT2 ...
ngpeijiun/sample-code-objc
Bricker/Bricker/GameWorld.h
// // GameWorld.h // Bricker // // Created by <NAME> on 1/5/15. // Copyright (c) 2015 SampleCode. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreGraphics/CGGeometry.h> #import <QuartzCore/CADisplayLink.h> static const int GAME_BRICKS_NUM = 5 * 10; enum GameState { GameStateInit, G...
ngpeijiun/sample-code-objc
Bricker/Bricker/ViewController.h
<filename>Bricker/Bricker/ViewController.h // // ViewController.h // Bricker // // Created by <NAME> on 1/5/15. // Copyright (c) 2015 SampleCode. All rights reserved. // #import <UIKit/UIKit.h> #import "GameViewController.h" @interface ViewController : UIViewController @property (strong, nonatomic) GameViewContr...
ngpeijiun/sample-code-objc
Bricker/Bricker/GameViewController.h
// // GameViewController.h // Bricker // // Created by <NAME> on 1/5/15. // Copyright (c) 2015 SampleCode. All rights reserved. // #import <UIKIt/UIKit.h> #import "GameWorld.h" @interface GameViewController : UIViewController <GameWorldGraphicsDelegate> { UIView *bricks[GAME_BRICKS_NUM]; float touchOffse...
ngpeijiun/sample-code-objc
Bricker/Bricker/AppDelegate.h
<gh_stars>1-10 // // AppDelegate.h // Bricker // // Created by <NAME> on 1/5/15. // Copyright (c) 2015 SampleCode. All rights reserved. // #import <UIKit/UIKit.h> #import "ViewController.h" @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (st...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.cAudioManager.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(cAudioManager::GetDistanceSquared) static int address; sta...
Lyuu17/plugin_sdk
plugin_III/game_III/eVehicleClass.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once enum eVehicleClass { VEHICLECLASS_CAR = 0x0, VEHICLECLASS_BOAT = 0x1, VEHICLECLASS_TRAIN = 0x2, VEHI...
Lyuu17/plugin_sdk
plugin_III/game_III/eCamMode.h
<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once enum eCamMode { MODE_NONE = 0, MODE_TOPDOWN = 1, MODE_GTACLASSIC = 2, MODE_BEHINDCAR = 3...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CDamageManager.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CDamageManager::GetWheelStatus) static int address; static...
Lyuu17/plugin_sdk
plugin_III/game_III/CPed.h
<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "RenderWare.h" #include "CPhysical.h" #include "CStoredCollPoly...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.cDMAudio.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(cDMAudio::PlayFrontEndSound) static int address; static in...
Lyuu17/plugin_sdk
plugin_III/game_III/CGarage.h
<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CObject.h" #include "CStoredCar.h" #include "eGarageType.h" #i...
Lyuu17/plugin_sdk
plugin_III/game_III/eWeaponType.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once enum eWeaponType : unsigned int { WEAPONTYPE_UNARMED = 0, WEAPONTYPE_BASEBALLBAT, WEAPONTYPE_COLT45, WEAPONT...
Lyuu17/plugin_sdk
plugin_III/game_III/CFileMgr.h
<filename>plugin_III/game_III/CFileMgr.h /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #define FILESTREAM int class PLUGIN_API CF...
Lyuu17/plugin_sdk
plugin_III/game_III/cSampleManager.h
<filename>plugin_III/game_III/cSampleManager.h /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #pragma pack(push, 1) struct tSample { unsigne...
Lyuu17/plugin_sdk
plugin_III/game_III/CAnimManager.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CAnimationStyleDescriptor.h" #include "CAnimBlendAssocGroup.h" #include "C...
Lyuu17/plugin_sdk
plugin_III/game_III/CSprite.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "RenderWare.h" #include "CVector.h" #include "CRect.h" class PLUGIN_API CS...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CCollision.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CCollision::ProcessLineOfSight) static int address; static...
Lyuu17/plugin_sdk
plugin_III/game_III/CMatrix.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CVector.h" #include "RenderWare.h" class CMatrix { public: // RwV3d-l...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CFont.h
<reponame>Lyuu17/plugin_sdk<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CFont::DrawFonts) stati...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.cSampleManager.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(cSampleManager::SetStreamedVolumeAndPan) static int address; ...
Lyuu17/plugin_sdk
plugin_III/game_III/CRegisteredCorona.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CVector.h" class CRegisteredCorona { public: int m_nUniqueID; int m_nLastLOScheck...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CFileMgr.h
<reponame>Lyuu17/plugin_sdk<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CFileMgr::Initialise) stat...
Lyuu17/plugin_sdk
plugin_III/game_III/CTempColModels.h
<reponame>Lyuu17/plugin_sdk<filename>plugin_III/game_III/CTempColModels.h<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h"...
Lyuu17/plugin_sdk
plugin_III/game_III/CModelInfo.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CBaseModelInfo.h" #include "CSimpleModelInfo.h" #include "CVehicleModelInfo.h" #include "C...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CModelInfo.h
<gh_stars>0 /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CModelInfo::AddClumpModel) static int address; ...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CWeaponInfo.h
/* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { CTOR_META_BEGIN(CWeaponInfo) static int address; static int global_ad...
Lyuu17/plugin_sdk
plugin_III/game_III/CCamera.h
<filename>plugin_III/game_III/CCamera.h /* Plugin-SDK (Grand Theft Auto 3) source file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #pragma once #include "PluginBase.h" #include "CPlaceable.h" #include "CGarage.h"...
Lyuu17/plugin_sdk
plugin_III/game_III/meta/meta.CAnimManager.h
<filename>plugin_III/game_III/meta/meta.CAnimManager.h /* Plugin-SDK (Grand Theft Auto 3) header file Authors: GTA Community. See more here https://github.com/DK22Pac/plugin-sdk Do not delete this comment block. Respect others' work! */ #include "PluginBase.h" namespace plugin { META_BEGIN(CAnimManage...