summaryrefslogtreecommitdiff
path: root/RobotFirmware/lib/HexaNRL/src/NRLPublic.h
blob: d1a9e46f6ba855b66d0bb5b19608bc91749d1f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

// ============================================================
//  NRLPublic — the robot entry-point API used by RobotMain.ino
// ============================================================
//  RobotMain.ino calls these two functions and nothing else from the
//  framework's execution engine. The engine itself (NRLRunner, the match
//  state machine, the ESP-NOW command handling) is internal and compiled
//  into the prebuilt .a — its headers are NOT shipped, so the run loop and
//  state machine can't be read or edited. Students never call these; their
//  code lives in opmodes/.

// One-time setup: ESP-NOW init + advertise (call in setup()). The team identity
// is passed in from RobotMain.ino because that file is compiled inside the
// student's project, so it sees the per-project -DNRL_TEAM_NUMBER /
// -DNRL_TEAM_NAME / -DNRL_WIFI_CHANNEL stamp — the prebuilt engine .a cannot.
void nrl_begin(int teamNumber, const char* teamName, int wifiChannel);
void nrl_tick();    // run the active OpMode one 100Hz step (call in loop())