<commit_before>#include "global.h"
#include "schedule.h"

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//                            __                        __
//                           / /   ____   _____ ____ _ / /
//                          / /   / __ \ / ___// __ `// /
//                         / /___/ /_/ // /__ / /_/ // /
//                        /_____/\____/ \___/ \__,_//_/
//
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
volatile uint32_t g_now = 0;

typedef struct
{
    Fn func;
    uint32_t run_time;
} Event;

typedef struct
{
    Fn func;
    uint8_t    enabled;
    uint32_t   run_time;
    uint32_t   next_run_time;
} PeriodicEvent;

static uint8_t _count;
static PeriodicEvent _pstore[MAX_PER_EVENT_CNT];
static uint32_t _map;

static Event _sstore[MAX_SING_EVENT_CNT];

void ScheduleService(void);
static void PeriodicService(uint32_t current_time);
void SingleEventService(uint32_t current_time);
static uint8_t get_map_size(void);

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
extern void ScheduleInit(void)
{
    SystemCoreClockUpdate();
    SysTick_Config(SystemCoreClock/100);<commit_msg>Fix schedule tick time to be 1ms. This also fixed the train speed signaling.<commit_after>#include "global.h"
#include "schedule.h"

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//                            __                        __
//                           / /   ____   _____ ____ _ / /
//                          / /   / __ \ / ___// __ `// /
//                         / /___/ /_/ // /__ / /_/ // /
//                        /_____/\____/ \___/ \__,_//_/
//
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
volatile uint32_t g_now = 0;

typedef struct
{
    Fn func;
    uint32_t run_time;
} Event;

typedef struct
{
    Fn func;
    uint8_t    enabled;
    uint32_t   run_time;
    uint32_t   next_run_time;
} PeriodicEvent;

static uint8_t _count;
static PeriodicEvent _pstore[MAX_PER_EVENT_CNT];
static uint32_t _map;

static Event _sstore[MAX_SING_EVENT_CNT];

void ScheduleService(void);
static void PeriodicService(uint32_t current_time);
void SingleEventService(uint32_t current_time);
static uint8_t get_map_size(void);

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
extern void ScheduleInit(void)
{
    SystemCoreClockUpdate();
    SysTick_Config(SystemCoreClock/1000);
{'fraction_non_alphanumeric': 0.2759714512291832, 'fraction_numerical': 0.017446471054718478, 'mean_word_length': 2.4279891304347827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5878737', 'n_tokens_mistral': 735, 'n_tokens_neox': 681, 'n_words': 122}