Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.2
3 changes: 2 additions & 1 deletion examples/IBT2MotorDemo/IBT2MotorDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
* ============================================================================
*/

#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/JoystickTest/JoystickTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
* ============================================================================
*/

#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/MotorOpenLoopDemo/MotorOpenLoopDemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
* ============================================================================
*/

#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/AutonomousDemo/AutonomousDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/MecanumDriveDemo/MecanumDriveDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/ShooterDemo/ShooterDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/SliderDemo/SliderDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/TankDriveDemo/TankDriveDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
3 changes: 2 additions & 1 deletion examples/command_based/TurretDemo/TurretDemo.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define PROBOT_WIFI_AP_SSID "ProBot"
#define PROBOT_WIFI_AP_PASSWORD "ProBot1234"
#define PROBOT_WIFI_AP_CHANNEL 3 // Opsiyonel (varsayilan 1)
#define PROBOT_WIFI_AP_CHANNEL 3

#include <probot.h>
#include <probot/io/joystick_api.hpp>
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.2.0
version: 0.2.2
description: ESP32-S3 robotics control library
url: https://github.com/nfrproducts/probot-lib
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
"type": "git",
"url": "https://github.com/nfrproducts/probot-lib"
},
"version": "0.2.0"
"version": "0.2.2"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=probot
version=0.2.0
version=0.2.2
author=Tuna Gül
maintainer=Tuna Gül <tunagul54@gmail.com>
sentence=ProBot Library for Robotics Competitions.
Expand Down
14 changes: 5 additions & 9 deletions src/driverstation/esp32s3/driver_station_esp32.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
#error "DriverStation AP password not provided. Define PROBOT_WIFI_AP_PASSWORD (>=8 chars) before including probot.h."
#endif
static_assert(sizeof(PROBOT_WIFI_AP_PASSWORD) - 1 >= 8, "PROBOT_WIFI_AP_PASSWORD must be at least 8 characters.");
#ifdef PROBOT_WIFI_AP_SSID
#ifndef PROBOT_WIFI_AP_SSID
#error "WiFi AP SSID not provided. Define PROBOT_WIFI_AP_SSID before including probot.h."
#endif
static_assert(sizeof(PROBOT_WIFI_AP_SSID) - 1 >= 1, "PROBOT_WIFI_AP_SSID must be at least 1 character.");
#ifdef PROBOT_WIFI_AP_SSID_NO_MAC_SUFFIX
static_assert(sizeof(PROBOT_WIFI_AP_SSID) - 1 <= 32, "PROBOT_WIFI_AP_SSID must be 32 characters or fewer.");
#else
static_assert(sizeof(PROBOT_WIFI_AP_SSID) - 1 <= 25, "PROBOT_WIFI_AP_SSID must be 25 characters or fewer when MAC suffix is enabled.");
#endif
#endif
#ifndef PROBOT_WIFI_AP_CHANNEL
#define PROBOT_WIFI_AP_CHANNEL 1
#error "WiFi AP channel not provided. Define PROBOT_WIFI_AP_CHANNEL (1-11) before including probot.h."
#endif
static_assert(PROBOT_WIFI_AP_CHANNEL >= 1 && PROBOT_WIFI_AP_CHANNEL <= 11,
"PROBOT_WIFI_AP_CHANNEL must be between 1 and 11.");
Expand All @@ -34,16 +35,11 @@ namespace probot::driverstation::esp32 {

void begin(){
const char* pw = PROBOT_WIFI_AP_PASSWORD;
String ssid;
#ifdef PROBOT_WIFI_AP_SSID
ssid = String(PROBOT_WIFI_AP_SSID);
String ssid = String(PROBOT_WIFI_AP_SSID);
#ifndef PROBOT_WIFI_AP_SSID_NO_MAC_SUFFIX
char suffix[8];
snprintf(suffix, sizeof(suffix), "-%06X", (unsigned int)(ESP.getEfuseMac() & 0xFFFFFF));
ssid += suffix;
#endif
#else
ssid = generateSSID();
#endif
ap_ssid_ = ssid;
WiFi.mode(WIFI_AP);
Expand Down