From b38d0fa9a4fad1b623c37055a48aa5aec9f79d83 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 2 Feb 2023 15:25:51 -0700 Subject: [PATCH] move files around --- Makefile | 2 +- {src => include}/cobs/cobs.h | 0 {src => include}/cobs/cobsr.h | 0 {src/Nanopb => include/nanopb}/pb.h | 0 {src/Nanopb => include/nanopb}/pb_common.h | 0 {src/Nanopb => include/nanopb}/pb_decode.h | 0 {src/Nanopb => include/nanopb}/pb_encode.h | 0 include/{ => proto}/robotControl.h | 0 src/Nanopb/.piopm | 1 - src/Nanopb/__init__.py | 0 src/Nanopb/library.json | 42 ---------------------- src/Nanopb/pb_common.c | 2 +- src/Nanopb/pb_decode.c | 6 ++-- src/Nanopb/pb_encode.c | 6 ++-- src/cobs/cobs.c | 2 +- src/cobs/cobsr.c | 2 +- src/main.cpp | 5 +-- src/proto/messages.pb.h | 6 ++-- src/robotControl.cpp | 2 +- 19 files changed, 17 insertions(+), 59 deletions(-) rename {src => include}/cobs/cobs.h (100%) rename {src => include}/cobs/cobsr.h (100%) rename {src/Nanopb => include/nanopb}/pb.h (100%) rename {src/Nanopb => include/nanopb}/pb_common.h (100%) rename {src/Nanopb => include/nanopb}/pb_decode.h (100%) rename {src/Nanopb => include/nanopb}/pb_encode.h (100%) rename include/{ => proto}/robotControl.h (100%) delete mode 100644 src/Nanopb/.piopm delete mode 100644 src/Nanopb/__init__.py delete mode 100644 src/Nanopb/library.json diff --git a/Makefile b/Makefile index c9c3826..de7718a 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ EXTRA_CFLAGS= EXTRA_CXXFLAGS= # Set to 1 to enable hot/cold linking -USE_PACKAGE:=1 +USE_PACKAGE:=0 # Add libraries you do not wish to include in the cold image here # EXCLUDE_COLD_LIBRARIES:= $(FWDIR)/your_library.a diff --git a/src/cobs/cobs.h b/include/cobs/cobs.h similarity index 100% rename from src/cobs/cobs.h rename to include/cobs/cobs.h diff --git a/src/cobs/cobsr.h b/include/cobs/cobsr.h similarity index 100% rename from src/cobs/cobsr.h rename to include/cobs/cobsr.h diff --git a/src/Nanopb/pb.h b/include/nanopb/pb.h similarity index 100% rename from src/Nanopb/pb.h rename to include/nanopb/pb.h diff --git a/src/Nanopb/pb_common.h b/include/nanopb/pb_common.h similarity index 100% rename from src/Nanopb/pb_common.h rename to include/nanopb/pb_common.h diff --git a/src/Nanopb/pb_decode.h b/include/nanopb/pb_decode.h similarity index 100% rename from src/Nanopb/pb_decode.h rename to include/nanopb/pb_decode.h diff --git a/src/Nanopb/pb_encode.h b/include/nanopb/pb_encode.h similarity index 100% rename from src/Nanopb/pb_encode.h rename to include/nanopb/pb_encode.h diff --git a/include/robotControl.h b/include/proto/robotControl.h similarity index 100% rename from include/robotControl.h rename to include/proto/robotControl.h diff --git a/src/Nanopb/.piopm b/src/Nanopb/.piopm deleted file mode 100644 index 6328209..0000000 --- a/src/Nanopb/.piopm +++ /dev/null @@ -1 +0,0 @@ -{"type": "library", "name": "Nanopb", "version": "0.4.6+4", "spec": {"owner": "nanopb", "id": 431, "name": "Nanopb", "requirements": null, "uri": null}} \ No newline at end of file diff --git a/src/Nanopb/__init__.py b/src/Nanopb/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/Nanopb/library.json b/src/Nanopb/library.json deleted file mode 100644 index abcb4f9..0000000 --- a/src/Nanopb/library.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "Nanopb", - "version": "0.4.6.4", - "keywords": "protocol buffers, protobuf, google", - "description": "Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (<10 kB ROM, <1 kB RAM) memory constraints.", - "repository": { - "type": "git", - "url": "https://github.com/nanopb/nanopb.git" - }, - "authors": [{ - "name": "Petteri Aimonen", - "email": "jpa@nanopb.mail.kapsi.fi", - "url": "http://koti.kapsi.fi/jpa/nanopb/" - }], - "export": { - "include": [ - "*.c", - "*.cpp", - "*.h", - "examples", - "generator" - ], - "exclude": [ - "generator/**/__pycache__", - "examples/platformio/.gitignore" - ] - }, - "build": { - "extraScript": "generator/platformio_generator.py", - "srcDir": "", - "srcFilter": [ - "+<*.c>" - ] - }, - "examples": [ - "examples/platformio/platformio.ini", - "examples/platformio/src/*.c", - "examples/*/*.c" - ], - "frameworks": "*", - "platforms": "*" -} diff --git a/src/Nanopb/pb_common.c b/src/Nanopb/pb_common.c index 6aee76b..e4765d8 100644 --- a/src/Nanopb/pb_common.c +++ b/src/Nanopb/pb_common.c @@ -3,7 +3,7 @@ * 2014 Petteri Aimonen */ -#include "pb_common.h" +#include "nanopb/pb_common.h" static bool load_descriptor_values(pb_field_iter_t *iter) { diff --git a/src/Nanopb/pb_decode.c b/src/Nanopb/pb_decode.c index 5405c87..1480e08 100644 --- a/src/Nanopb/pb_decode.c +++ b/src/Nanopb/pb_decode.c @@ -13,9 +13,9 @@ #define checkreturn __attribute__((warn_unused_result)) #endif -#include "pb.h" -#include "pb_decode.h" -#include "pb_common.h" +#include "nanopb/pb.h" +#include "nanopb/pb_decode.h" +#include "nanopb/pb_common.h" /************************************** * Declarations internal to this file * diff --git a/src/Nanopb/pb_encode.c b/src/Nanopb/pb_encode.c index 7f56201..d85e031 100644 --- a/src/Nanopb/pb_encode.c +++ b/src/Nanopb/pb_encode.c @@ -3,9 +3,9 @@ * 2011 Petteri Aimonen */ -#include "pb.h" -#include "pb_encode.h" -#include "pb_common.h" +#include "nanopb/pb.h" +#include "nanopb/pb_encode.h" +#include "nanopb/pb_common.h" /* Use the GCC warn_unused_result attribute to check that all return values * are propagated correctly. On other compilers and gcc before 3.4.0 just diff --git a/src/cobs/cobs.c b/src/cobs/cobs.c index 05a353e..ccba443 100644 --- a/src/cobs/cobs.c +++ b/src/cobs/cobs.c @@ -5,7 +5,7 @@ */ #include -#include "cobs.h" +#include "cobs/cobs.h" /***************************************************************************** diff --git a/src/cobs/cobsr.c b/src/cobs/cobsr.c index 80aae58..3d768cc 100644 --- a/src/cobs/cobsr.c +++ b/src/cobs/cobsr.c @@ -5,7 +5,7 @@ */ #include -#include "cobsr.h" +#include "cobs/cobsr.h" /***************************************************************************** diff --git a/src/main.cpp b/src/main.cpp index 1a40d99..6041982 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,7 +4,7 @@ #include "okapi/impl/device/rotarysensor/IMU.hpp" #include "pros/misc.h" #include "pros/rtos.hpp" -#include "robotControl.h" +#include "proto/robotControl.h" #include "cartesian.h" #include "polar.h" #include "odom.h" @@ -77,6 +77,7 @@ void on_center_button() { * to keep execution time for this mode under a few seconds. */ void initialize() { + printf("eneterd initialize.\n"); pros::lcd::initialize(); pros::lcd::set_text(1, "Hello PROS User!"); @@ -195,7 +196,7 @@ void opcontrol() { okapi::QAngle robotHeading = 0_rad; odom odom1 = odom(); double drivePow=0; - pros::Motor intake (); + //pros::Motor intake (); while (true) { //pros::lcd::print(0, "AMT21_left value: %d", amt21_left.get_value()); pros::lcd::print(2, "AMT21_right value: %d", up.get_value()); diff --git a/src/proto/messages.pb.h b/src/proto/messages.pb.h index 76a193d..ff3bc96 100644 --- a/src/proto/messages.pb.h +++ b/src/proto/messages.pb.h @@ -3,9 +3,9 @@ #ifndef PB_MESSAGES_PB_H_INCLUDED #define PB_MESSAGES_PB_H_INCLUDED -#include "../Nanopb/pb.h" -#include "../Nanopb/pb_encode.h" -#include "../Nanopb/pb_decode.h" +#include "nanopb/pb.h" +#include "nanopb/pb_encode.h" +#include "nanopb/pb_decode.h" #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. diff --git a/src/robotControl.cpp b/src/robotControl.cpp index 077df18..8130491 100644 --- a/src/robotControl.cpp +++ b/src/robotControl.cpp @@ -1,5 +1,5 @@ #include "main.h" -#include "robotControl.h" +#include "proto/robotControl.h" #include "okapi/api/units/QAngle.hpp" using namespace okapi::literals;