pros/misc.h file

Contains prototypes for miscellaneous functions pertaining to the controller, battery, and competition control.

This file should not be modified by users, since it gets replaced whenever a kernel upgrade occurs.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Namespaces

namespace pros
LLEMU Conditional Include
namespace pros::c

Functions

uint8_t competition_get_status(void)
uint8_t competition_is_disabled(void)
uint8_t competition_is_connected(void)
uint8_t competition_is_autonomous(void)
uint8_t competition_is_field(void)
int32_t controller_is_connected(controller_id_e_t id)
int32_t controller_get_analog(controller_id_e_t id, controller_analog_e_t channel)
Gets the value of an analog channel (joystick) on a controller.
int32_t controller_get_battery_capacity(controller_id_e_t id)
Gets the battery capacity of the given controller.
int32_t controller_get_battery_level(controller_id_e_t id)
Gets the battery level of the given controller.
int32_t controller_get_digital(controller_id_e_t id, controller_digital_e_t button)
Checks if a digital channel (button) on the controller is currently pressed.
int32_t controller_get_digital_new_press(controller_id_e_t id, controller_digital_e_t button)
Returns a rising-edge case for a controller button press.
int32_t controller_print(controller_id_e_t id, uint8_t line, uint8_t col, const char* fmt, ...)
Sets text to the controller LCD screen.
int32_t controller_set_text(controller_id_e_t id, uint8_t line, uint8_t col, const char* str)
Sets text to the controller LCD screen.
int32_t controller_clear_line(controller_id_e_t id, uint8_t line)
Clears an individual line of the controller screen.
int32_t controller_clear(controller_id_e_t id)
Clears all of the lines on the controller screen.
int32_t controller_rumble(controller_id_e_t id, const char* rumble_pattern)
Rumble the controller.
int32_t battery_get_voltage(void)
Gets the current voltage of the battery, as reported by VEXos.
int32_t battery_get_current(void)
Gets the current current of the battery, as reported by VEXos.
double battery_get_temperature(void)
Gets the current temperature of the battery, as reported by VEXos.
double battery_get_capacity(void)
Gets the current capacity of the battery, as reported by VEXos.
int32_t usd_is_installed(void)
Checks if the SD card is installed.
int32_t usd_list_files(const char* path, char* buffer, int32_t len)
Lists the files in a directory specified by the path Puts the list of file names (NOT DIRECTORIES) into the buffer seperated by newlines.

V5 Competition

enum competition_status { COMPETITION_DISABLED = 1 << 0, COMPETITION_CONNECTED = 1 << 2, COMPETITION_AUTONOMOUS = 1 << 1, COMPETITION_SYSTEM = 1 << 3 }

Variables

const char* baked_date
Date and Time
const char* baked_time

Defines

#define NUM_V5_PORTS