I need help with my autonomous

ok i will complete the program i will tell you if i have any more problems

i finnised the program

but it still will not download

Could you post the error message.
When you say it does not download, did it compile, or is there a connection issue.

3 Likes

We download it and it is not dining what we tell it to

It does not say a error it says it is downloaded but when we run it it does not do what the codes says to do

The most likely case is that everything is working correctly and you have a bug in your code. What exactly isn’t working, is it usercontrol or autonomous? Does it not do anything at all or does it do something, but that something is incorrect? Are the controls and motor ports set up correctly?

Also uploading your current code again would help, since I assume it change since this post.

2 Likes

it is autonomous when we download it to the brain and run it iy does the old v5 text autonomous#include “main.h”

pros::Controller c(pros::E_CONTROLLER_MASTER);
pros::Motor DriveL(6);
pros::Motor DriveR(7);
pros::Motor IntakeL(1);
pros::Motor IntakeR(3);
pros::Motor Placer(5);

void set Drive(int l, int r)
{
DriveL.move(l);
DriveR.move(-r);
}

void set Intake(int p)
{
IntakeL.move§;
IntakeR.move(-p);
}

void set Placer(int p)
{
Placer.move§;
}

void initialize() {
}

void disabled() {}

void competition initialize() {}

void autonomous() {
set Intake(1000)
pros::delay(1000);
set Drive(127,127);
pros::delay(1000);
set Drive(127,127);
set Drive(0,0);

}

void op control() {
int x,y;
while (true) {
x = abs(c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y)) > 5 ? c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y) : 0;
y = abs(c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_X)) > 5 ? c.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_X) : 0;

	set Drive(y+x,x-y);

	if(c.get_digital(pros::E_CONTROLLER_DIGITAL_L2))
		set Intake(127);
	else if(c.get_digital(pros::E_CONTROLLER_DIGITAL_L1))
		set Intake(-127);
	else
		set Intake(0);

	if(c.get_digital(pros::E_CONTROLLER_DIGITAL_UP))
		set Placer(127);
	else if(c.get_digital(pros::E_CONTROLLER_DIGITAL_DOWN))
		set Placer(-127);
	else
		set Placer(0);

	pros::delay(20);
}

}

First please use ``` before and after your code to tell vex forum to display it as code.

Second you still haven’t rename the function since function names cannot have spaces and yours do.

This means your code doesn’t compile and so when your upload it re-uploadeds the old code.

4 Likes
  • Git

  • GitHub

Initialize a new project directory with a Git repository

Create repository

190

2148A69:2

LFUTF-8Plain Text

GitHubGit (0)

this is what it is saying

That… is not a compilation error. I’m not super-experienced with the PROS editor but that appears to be some menu text.

I suggest you implement the fix @Codec and I have pointed out (remove spaces from function names) and try to recompile the code, then post the error text you get (if any).

2 Likes

we got ride of the spaces and i dont know if it is compiled or not

What does it say when you hit compile?

there is no compile button

Sorry I keep forgetting, in pros the button is labeled build. The red circle shows the build button.Screenshot (24)

2 Likes

ok
thank you for that

ok the pros was not working so i swiched back to v5 text and it says this when i download it
make process closed with exit code : 2

That just means “your code has errors”.

For more details about which errors, scroll up in the “output” tab, there will be more text that details what your errors are. Red-colored text is particularly important.

We’d be happy to help you debug your program, but that would require seeing it. Please copy and paste your entire program into a reply (remember to add ``` before and after for formatting), as well as the entire contents of the “problems” tab when you try to compile the program.

1 Like

[info]: Saving Project …
[info]: Project saved!
windows build for platform vexv5

details

vex/mkrules.mk:23: warning: overriding recipe for target ‘build/2148A’
vex/mkrules.mk:17: warning: ignoring old recipe for target ‘build/2148A’
vex/mkrules.mk:23: warning: overriding recipe for target ‘with’
vex/mkrules.mk:17: warning: ignoring old recipe for target ‘with’
vex/mkrules.mk:27: warning: overriding recipe for target ‘with’
vex/mkrules.mk:23: warning: ignoring old recipe for target ‘with’
make: Circular build/2148A <- build/2148A dependency dropped.
make: Circular with <- build/2148A dependency dropped.
make: Circular with <- with dependency dropped.
Usage: arm-none-eabi-objcopy [option(s)] in-file [out-file]
Copies a binary file, possibly transforming it in the process
The options are:
-I --input-target Assume input file is in format
-O --output-target Create an output file in format
-B --binary-architecture Set output arch, when input is arch-less
-F --target Set both input and output format to
–debugging Convert debugging information, if possible
-p --preserve-dates Copy modified/access timestamps to the output
-D --enable-deterministic-archives
Produce deterministic output when stripping archives
-U --disable-deterministic-archives
Disable -D behavior (default)
-j --only-section Only copy section into the output
–add-gnu-debuglink= Add section .gnu_debuglink linking to
-R --remove-section Remove section from the output
-S --strip-all Remove all symbol and relocation information
-g --strip-debug Remove all debugging symbols & sections
–strip-dwo Remove all DWO sections
–strip-unneeded Remove all symbols not needed by relocations
-N --strip-symbol Do not copy symbol
–strip-unneeded-symbol
Do not copy symbol unless needed by
relocations
–only-keep-debug Strip everything but the debug information
–extract-dwo Copy only DWO sections
–extract-symbol Remove section contents but keep symbols
-K --keep-symbol Do not strip symbol
–keep-file-symbols Do not strip file symbol(s)
–localize-hidden Turn all ELF hidden symbols into locals
-L --localize-symbol Force symbol to be marked as a local
–globalize-symbol Force symbol to be marked as a global
-G --keep-global-symbol Localize all symbols except
-W --weaken-symbol Force symbol to be marked as a weak
–weaken Force all global symbols to be marked as weak
-w --wildcard Permit wildcard in symbol comparison
-x --discard-all Remove all non-global symbols
-X --discard-locals Remove any compiler-generated symbols
-i --interleave [] Only copy N out of every bytes
–interleave-width Set N for --interleave
-b --byte Select byte in every interleaved block
–gap-fill Fill gaps between sections with
–pad-to Pad the last section up to address
–set-start Set the start address to
{–change-start|–adjust-start}
Add to the start address
{–change-addresses|–adjust-vma}
Add to LMA, VMA and start addresses
{–change-section-address|–adjust-section-vma} {=|+|-}
Change LMA and VMA of section by
–change-section-lma {=|+|-}
Change the LMA of section by
–change-section-vma {=|+|-}
Change the VMA of section by
{–[no-]change-warnings|–[no-]adjust-warnings}
Warn if a named section does not exist
–set-section-flags =
Set section 's properties to
–add-section = Add section found in to output
–rename-section =[,] Rename section to
–long-section-names {enable|disable|keep}
Handle long section names in Coff objects.
–change-leading-char Force output format’s leading character style
–remove-leading-char Remove leading character from global symbols
–reverse-bytes= Reverse bytes at a time, in output sections with content
–redefine-sym = Redefine symbol name to
–redefine-syms --redefine-sym for all symbol pairs
listed in
–srec-len Restrict the length of generated Srecords
–srec-forceS3 Restrict the type of generated Srecords to S3
–strip-symbols -N for all symbols listed in
–strip-unneeded-symbols
–strip-unneeded-symbol for all symbols listed
in
–keep-symbols -K for all symbols listed in
–localize-symbols -L for all symbols listed in
–globalize-symbols --globalize-symbol for all in
–keep-global-symbols -G for all symbols listed in
–weaken-symbols -W for all symbols listed in
–alt-machine-code Use the target’s 'th alternative machine
–writable-text Mark the output text as writable
–readonly-text Make the output text write protected
–pure Mark the output file as demand paged
–impure Mark the output file as impure
–prefix-symbols Add to start of every symbol name
–prefix-sections Add to start of every section name
–prefix-alloc-sections
Add to start of every allocatable
section name
–file-alignment Set PE file alignment to
–heap [,] Set PE reserve/commit heap to /

–image-base Set PE image base to
–section-alignment Set PE section alignment to
–stack [,] Set PE reserve/commit stack to /

–subsystem [:]
Set PE subsystem to [& ]
–compress-debug-sections Compress DWARF debug sections using zlib
–decompress-debug-sections Decompress DWARF debug sections using zlib
-v --verbose List all object files modified
@ Read options from
-V --version Display this program’s version number
-h --help Display this output
–info List object formats & architectures supported
arm-none-eabi-objcopy: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
make: *** [vex/mkrules.mk:23: build/2148A] Error 1

[error]: make process closed with exit code : 2