Giter VIP home page Giter VIP logo

pros's People

Contributors

aaryan-gautam avatar alexdickhans avatar alexhunton2 avatar aurindutta avatar ayushuk avatar baylessj avatar beyond-reality-dev avatar buzzec avatar djava avatar edjubuh avatar evanmiller620 avatar gracelu128 avatar hotelcalifornia avatar jerrylum avatar jm-spencer avatar kunwarsahni01 avatar mattfbacon avatar nathan-moore avatar nickmertin avatar noam987 avatar octogonapus avatar omegastag avatar phinc23 avatar richard-stump avatar rocky14683 avatar ssejrog avatar the2nake avatar theol0403 avatar tixorebel avatar willxucodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pros's Issues

Memory Permission Denied error with V5 Vision Sensor

Expected Behavior:

initialize the vision sensor

Actual Behavior:

Code will not run

Steps to reproduce:

create vision sensor instance with pros::Vision(port)
upload code
error

System information:

Kernel Version: 3.1.5
Windows 64-bit

Additional Information

Upgrade to LVGL 5.3

Expected Behavior:

LVGL is the latest version.

Actual Behavior:

LVGL is not the latest version.

Steps to reproduce:

Try using 5.2 and 5.3 features (LVGL docs have all been updated to 5.3-specific info) with PROS ๐Ÿ˜ƒ

System information:

Platform: V5
PROS Kernel Version: any

Additional Information

This was previously blocked on waiting for a full version of 5.2 to be released, which it now has been

Also apparently 5.3 has been released since the creation of this issue, so we'll just skip 5.2 entirely

Screenshots/Output Dumps/Stack Traces

N/A

Any plan about opensource PROS3 kernel?

Hi,

Thanks for your hard work on providing a better programming interface for VEX Robotic.
I'm interested in the internals of new V5 controller and wish to make some enhancement on V5, but there are no documents about low-level stuff. The only chance for me is to read PROS open source kernel just as what I did for Cortex. The release notes mentioned that the new kernel will be open-sourced around December but I didn't hear any news about that.

So I would like to ask if the PROS3 Kernel will be open-sourced?

Kernel Version: 3.1.0

C++ newlib compatibility

PROS and newlib have a conflicting FILE symbol
In file included from ../include/main.h:46:0, from lcd.cpp:4: ../include/API.h:744:13: error: conflicting declaration 'typedef int FILE' typedef int FILE; ^ In file included from /usr/include/newlib/c++/5.4.1/cwchar:44:0, from /usr/include/newlib/c++/5.4.1/bits/postypes.h:40, from /usr/include/newlib/c++/5.4.1/bits/char_traits.h:40, from /usr/include/newlib/c++/5.4.1/string:40, from /usr/include/newlib/c++/5.4.1/stdexcept:39, from /usr/include/newlib/c++/5.4.1/array:38, from /usr/include/newlib/c++/5.4.1/tuple:39, from lcd.cpp:1: /usr/include/newlib/wchar.h:53:16: note: previous declaration as 'typedef __FILE FILE' typedef __FILE FILE; ^
this can be solved by either changing the name of FILE or changing all the #defines to use static const instead and putting all the pros API functions into a namespace

system("cls") can't use.

Q1:I want to write an online monitoring. I tried the system ("CLS") command, and I couldn't clear the command line. I want to know what the function of the console is to clear the command line.
Q2:How to use llvm 5.0.1?I checked the data LLVM 5.0.1 only using the VS6.0 Library.
image

pros-win fails to set path to Atom in Windows 7

Expected Behavior:

pros-win.exe should add the directory containing Atom.exe to the user's path; this directory is C:\Users<user name>\AppData\Local\atom\bin

Actual Behavior:

In Windows 7, this directory does not get added to the user's path. As a result, the attempt to run apm fails, and the workaround on the purduesigbots website fails.
This behavior has been seen on two computers with Windows 7.

Steps to reproduce:

Download pros-win.exe from https://pros.cs.purdue.edu/, and then run it.

System information:

OS: Windows 7 Professional Service Pack 1
Kernel Version: Pros 0.7.0

Additional Information

Workaround:

  1. Installed Atom (http://atom.io/download/windows)
  2. Right-click the Atom icon on the desktop and select "Open File Location".
  3. Copy the path to Atom.exe from the Explorer address bar.
  4. Open the Start Menu, and right-click on "Computer".
  5. Select "Properties".
  6. Click on "Advanced System Settings"
  7. Click on "Environment Variables"
  8. Select "Path" under "User Variables".
  9. Click on "Edit"
  10. Append a semi-colon to the value of Path, then append the path to "Atom.exe".
  11. Click on "OK" three times until the Computer Properties window is closed.
  12. Download and run"pros-win.exe" from https://pros.cs.purdue.edu/.
  13. Open Atom.

Atom doesn't see CLI on Crouton

Expected Behavior:

Atom should detect PROS CLI

Actual Behavior:

Atom says "PROS CLI threw an error before returning the version."
Going into console then typing pros gives the following error: RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. See http://click.pocoo.org/python3/#python-3-surrogate-handling for details.

Adding this to ~/.bashrc or /etc/profile fixes the problem from terminal (running pros --version works)

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

System information:

Kernel Version: 3.18.0-14861-g70c266fc4519
OS: Crouton
Model: HP 11 G5 (4GB RAM version)

Additional Information

I think that this may be an Atom issue because it seems like Atom isn't seeing the environmental variables set in ~/.bashrc.

pros flash gives TypeError on Arch

Expected Behavior:

pros flash should flash the program

Actual Behavior:

pros flash
Traceback (most recent call last):
  File "/usr/bin/pros", line 11, in <module>
    load_entry_point('pros-cli==2.6.1', 'console_scripts', 'pros')()
  File "/usr/lib/python3.7/site-packages/proscli/main.py", line 9, in main
    cli.main(prog_name='pros')
  File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)

  File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
TypeError: flash() got an unexpected keyword argument 'file'

Steps to reproduce:

On my computer I just run pros flash in any folder

System information:

Operating System: (Windows, OS X, Ubuntu)
Arch Linux (Antergos)
PROS Version: (run pros --version)
pros, version 2.6.1

Additional Information

pros poll and pros lsusb both work, so does every other function, including terminal, other than flash.

uname -a    
Linux klaptop 4.18.12-arch1-1-ARCH #1 SMP PREEMPT Thu Oct 4 01:01:27 UTC 2018 x86_64 GNU/Linux

Ultrasonic sensor seems to return zero periodically

Expected Behavior:

The VEX Ultrasonic sensor should always return a reasonable value for the distance

Actual Behavior:

I'm seeing a zero value about every 50ms in between the correct values.

Steps to reproduce:

I wrote this test program that gets the time of a zero value and subtracts the last time we saw a zero
to look for a repeatable period:

 Ultrasonic ultra;
 const int leftMotor = 1;
 const int rightMotor = 10;

void operatorControl() {
		ultra = ultrasonicInit(4, 3);
		int lastTime = 0;
		while (1) {
			int distance = ultrasonicGet(ultra);
			if (distance == 0) {
				// if this is a zero range value
				unsigned long thisTime = millis();
				int time = thisTime - lastTime;  // time since last zero
				printf("millis: %d\n", time);
				while (ultrasonicGet(ultra) == 0); // wait for the distance to become nonzero
				lastTime = thisTime; // update the last time we saw a zero
			}
		}
}

System information:

mac os 10.12.6

Kernel Version:
2.12

Additional Information

How do I use auto.c?

Expected Behavior: Autonomous function runs

Actual Behavior: Nothing happens

Steps to reproduce:

void autonomous() {
motorSet(rightFront, 127);
}

System information:

Kernel Version: 2.12.1
Windows 8.1

Additional Information

How do I initialize my autonomous function so it runs once the competition switch is flipped to autonomous?

Motor is defined in main.h.

PROS cannot create project

Expected Behavior: Want to create new project on PROS MacOS.

Actual Behavior: When attempting to create project, it says that there are no kernels installed, visit conductor to download some.

Steps to reproduce:

Ran
pros conduct download
in terminal, but it's giving me an error:
Unable to get listing for pros-mainline at purduesigbots/pros
No templates were found with the name kernel
Aborted!

System information:

Kernel Version:

Additional Information

URGENT jumper clip issue

Expected Behavior: jumper clip works and controls auto.c

Actual Behavior: error given for pinMode();

Steps to reproduce:

System information:

Kernel Version: 2.12.1
Windows 10.1

Additional Information:

Hello, I am at a competition right now and need to add a limit switch, please help.

void initializeIO() {
pinMode(jumper, INPUT);
}
jumper is defined in main.h in port 12
The error is given within init.c in the function initializeIO where it says: pinMode(jumper, INPUT);

Add Documentation about C++ with 2.X.X

C++ with PROS V2.X.X is unofficially supported, and that is fine. But I think that a little documentation could go a long way for people trying to get C++ to work on the VEX Cortex.

For instance, static constructors are not called for some reason(#48 provides a solution, but this has not worked for me.) This pitfall can be avoided with a documented warning about static constructors. I think the section of the README.md titled "Does PROS support C++?" should contain a blurb about this, such as:

One known issue with C++ projects is that static constructors are never called, which means objects defined in the global scope will not behave as expected. To avoid this problem, avoid putting objects and structs in the global scope. Instead, define global pointers to objects, and use dynamic memory allocation (via the new keyword, or via malloc) inside functions.

Some different ideas about how to incorporate this warning:

  • put a comment directly in the user-generated templates that warns about this
  • add a file in this repository to track C++ integration, such as CPP-GUIDELINES.md
  • add to the website documentation about C++, and/or link to previously mentioned guideline file

I would be happy to make a PR either here or on the docs, if the maintainers would be supportive of such documentation.

Prose wont build "OSError: [WinError 216] This version of %1 is not compatible with the version of Windows you're running."

Expected Behavior:

Prose Builds correctly

Actual Behavior:

File "C:\Python36-32\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
File "proscli/main.py", line 26, in
File "proscli/main.py", line 9, in main
File "C:\Python36-32\lib\site-packages\click\core.py", line 697, in main
File "C:\Python36-32\lib\site-packages\click\core.py", line 1066, in invoke
File "C:\Python36-32\lib\site-packages\click\core.py", line 895, in invoke
File "C:\Python36-32\lib\site-packages\click\core.py", line 535, in invoke
File "C:\Python36-32\lib\site-packages\click\decorators.py", line 17, in new_func
File "C:\build\workspace\PROS_cli_master-U5QYE3LMZZ6R2DH474KTPRVX6MYCIOBQ2AX7YB2NUO2V2NE7GQ5Q\proscli\build.py", line 40, i
n make
File "C:\Python36-32\lib\subprocess.py", line 707, in init
File "C:\Python36-32\lib\subprocess.py", line 992, in _execute_child
OSError: [WinError 216] This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher

Steps to reproduce:

open project then click build and open PowerShell window

System information:

Kernel Version:
1.21.2

Additional Information

computer running windows 10 version 1151 32bit

Makefile threads are not secure.

If I use make all - j8
But not before make clean
He will make clean and make at the same time.
If I change the. HPP file, he will not automatically re-link the header file.
It would be great to add CmakeLists. txt and Ninja support.
It's too slow to use arm-gcc on Win10.

Prune stale branches

There are a lot of stale branches which we don't need to keep around anymore that should be deleted.

pros-editor doesn't create desktop entry

Expected Behavior:

For the pros-editor.deb to make a shortcut

Actual Behavior:

doesn't make a shortcut

Steps to reproduce:

just install the .deb file

System information:

Ubuntu 18.10, this happens on any Ubuntu version
Kernel Version: 4.18.0-10

Additional Information

When you install the pros-editor.deb, it doesn't produce a application shortcut like most programs do.

GitHub tab is blank, but only in pros editor

Expected Behavior:

Option to sign in to GitHub appears when the GitHub tab is opened.

Actual Behavior:

GitHub tab is blank. (see screenshot)

Steps to reproduce:

-Open the PROS Editor
-Select 'Packages'
-Select 'GitHub'
-Select 'Toggle GitHub Tab'

System information:

Platform: V5 C++
PROS Kernel Version: 3.1.5

Additional Information

-Using OkapiLab 3.3.8
-Attempted to fix install multiple times
-GitHub tab works on vanilla Atom (see screenshot)
-Works by opening GitHub Desktop, loading the repo, and selecting 'open in Atom'.

Screenshots/Output Dumps/Stack Traces

screenshot from pros editor
screenshot from pros editor
screenshot from atom through github
screenshot from atom through github

Is my C++ setup wrong?

image
I only modified this, and then changed the.C to.Cpp., it could be compiled and passed.

https://blog.pxtst.com/using-c-in-pros/
The methods are completely different from the tutorials
I see that in the VEX forum, the setting of C++ is quite complex.

image

https://github.com/niwhsa9/VEX_2017-2018_Team2496V_CODE/tree/V3
I tried to compile the program, but I couldn't compile it at all.

The constructor and the destructor are invalid. But it doesn't matter, I initialized it by myself.
My biggest problem now seems to be that when I connect to the field control, after the automatic race is over, the manual mode needs to wait for a second to operate the remote controller. It doesn't matter if we operate the remote controller. If we don't wait, the data generated by TASK1 and TASK2 will go wrong.

Getting PROS to run on Ubuntu 14.04

Expected Behavior:

We're trying to run PROS on our student 1:1 computers (primarily, for the robotics team). We're having issues getting PROS to communicate with the VEX Cortex Microcontroller (Logic PCB). I referenced the documentation here:

https://pros.cs.purdue.edu/cortex/getting-started/debian-linux.html

For our students, we run a custom Linux distro based off of Ubuntu 14.04 (Cub Linux).

I know the documentation recommends to run Ubuntu 16.04 (particularly, for arm-none-eabi-gcc):

https://pros.cs.purdue.edu/cortex/tutorials/known-issues.html#cannot-find-libstdc-a

Unfortunately, we can't upgrade the students to 16.04 during our school year (production time; can't be done). We're developing 16.04 for our later releases, so hopefully this won't be a problem next year.

Actual Behavior:

I downloaded/installed Atom off of GitHub. I didn't use the PROS edition because it depends on clang. I installed clang-3.9, but Atom keeps referencing the clang package, which in 14.04 is clang-3.4.

root@TRUCKEROS-IMG:/opt# sudo dpkg -i pros-editor-amd64.deb 
(Reading database ... 169691 files and directories currently installed.)
Preparing to unpack pros-editor-amd64.deb ...
Unpacking pros-editor (1.21.2) over (1.21.2) ...
dpkg: dependency problems prevent configuration of pros-editor:
 pros-editor depends on clang; however:
  Package clang is not installed.

dpkg: error processing package pros-editor (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.22-1ubuntu1.1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Errors were encountered while processing:
 pros-editor
root@TRUCKEROS-IMG:/opt# 

I changed the symbolic link for clang to point to 3.9. Here's my clang information:

root@TRUCKEROS-IMG:/opt# /usr/bin/clang --version
clang version 3.9.1-4ubuntu3~14.04.3 (tags/RELEASE_391/rc2)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@TRUCKEROS-IMG:/opt# 

I have the Cortex connected as described in this diagram:

https://pros.cs.purdue.edu/cortex/tutorials/known-issues.html#linux-a-a-tethering

I see ttyACM0 as an option in /dev, and lsusb reads the device:

root@TRUCKEROS-IMG:/opt# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04d8:000a Microchip Technology, Inc. CDC RS-232 Emulation Demo
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@TRUCKEROS-IMG:/opt# 

I was wondering if someone could assist. I'll keep working. If I can't get it working, I'll just virtualize Ubuntu 16.04 for our students. Any help & guidance is much appreciated! :)

Steps to reproduce:

N/A

System information:

Kernel Version: 4.2.0-42-generic
atom Version: 1.32.0
git Version: 1.9.1

Additional Information

If I need to move this issue to another repo, please let me know.

timer

I am a senior high school student. Before I used EASYC, I would like to ask how to write timer functions. Just like EASYC, there are starttimer (1); presstimer (1,0); gettimer (1); stoptimer (1);

Kernel Issue

Expected Behavior: New project is created

Actual Behavior: Error, "You don't have any downloaded kernels. Visit Conductor to download some."

Steps to reproduce:

System information:

Kernel Version:

Additional Information

Windows installation doesn't work well for non-admin user.

Expected Behavior:

Expected it to work for admin and non-admin user.

Actual Behavior:

For non-admin user, it always complains about PROS Cli not being in path and things don't work i.e. can't compile etc.

Steps to reproduce:

  1. Install from a non-admin or admin account. Installing from non-admin account gives apm errors (that's another issue)
  2. Try to access it from non-admin account. U'll see the Pros CLI not in path on the Pros Welcome page and things don't work after that. U can view and edit files but that's about it.

System information:

Kernel Version:
Windows 10.

Additional Information

I've done multiple installs. From admin accout and non-admin account. The issue is the same no matter what. I can use it fine from admin account. I want my kid to use it on his account which doesn't have admin privileges.

Task Deletes

Expected Behavior: When deleting tasks we would expect them be removed and resources freed.

Actual Behavior: When we delete tasks, the task counts never drop. If we create a task, let it do its job and then have it call taskDelete(NULL) or by using the taskhandle, the task count never drops.

Steps to reproduce: In addition to the standard task, there are 4 other tasks that are running plus the one that we are trying to use to create and delete itself. The task count increase until it reaches 17 and then fails because the task limit is set to 16.

System information:

Kernel Version: 2.6.1

Additional Information

File I/O works with C functions but not with C++ std::fstream

Expected Behavior:

Using STL to read and write files

Actual Behavior:

1 if i use "std::fstream" ,file can't open
2 If I use C language, I can open and read files. But if there are Chinese characters, PYTHON3 will make mistakes. Maybe it's the encoding of files.
3 If I set my configRead class as a global class, it will not read correctly, because the global class construction is disorderly, and it only works after initialize (). Because there is no parametric constructor for pros::Motor class, all of my robot project classes can only be constructed as local variables.

Steps to reproduce:

System information:

Operating System: (Windows, OS X, Ubuntu)
windows 10 1803
PROS Version: (run pros --version)
pros, version 3.1.2

Additional Information

kernel 3.3.4
oklib 3.3.7

Screenshots/Output Dumps/Stack Traces

1
2

pros-install_ubuntu.sh has a poor user experience

The pros-install_ubuntu.sh script installed Atom v1.10.2 over my previous v1.12.6. Downgrading the LSD in a minor version breaks some small functionality, but more importantly I'd like to keep my latest version!

Moreover, the script installed the Atom extension tool-bar which appears to be (mostly) unrelated to PROS proper but doesn't ask to do these things. echo "Install Atom extensions?"; read -n2 answer would have been better.

Finally, I think it is poor code quality when a non-system program asks me for my Linux password. For all I know, that [sudo] password for cat: prompt is completely fake and going to send my password to your servers so you can add me to your botnet.

Instead of running sudo apt-get update ; sudo apt-get install ..., use something like this:

if [ "$EUID" -ne 0 ]
  then echo "Please run as: sudo $0"
  exit
fi
apt-get update
apt-get install ...

I'd open a pull request except I can't because the pros-install_ubuntu.sh script is release-only.

PROS does not work with stdio

Expected Behavior:

API.H would not conflict with stdio

Actual Behavior:

CC -I../include -I../src opcontrol.c
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:759:14: error: conflicting types for 'PROS_FILE'
 #define FILE PROS_FILE
              ^
../include/API.h:750:13: note: previous declaration of 'PROS_FILE' was here
 typedef int PROS_FILE;
             ^~~~~~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:191:5: error: conflicting types for 'fclose'
 int _EXFUN(fclose, (FILE *));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:877:6: note: previous declaration of 'fclose' was here
 void fclose(PROS_FILE *stream);
      ^~~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:192:5: error: conflicting types for 'fflush'
 int _EXFUN(fflush, (FILE *));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:921:5: note: previous declaration of 'fflush' was here
 int fflush(PROS_FILE *stream);
     ^~~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:196:5: error: conflicting types for 'fprintf'
 int _EXFUN(fprintf, (FILE *__restrict, const char *__restrict, ...)
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:1104:5: note: previous declaration of 'fprintf' was here
 int fprintf(PROS_FILE *stream, const char *formatString, ...);
     ^~~~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:212:5: error: conflicting types for 'fgetc'
 int _EXFUN(fgetc, (FILE *));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:930:5: note: previous declaration of 'fgetc' was here
 int fgetc(PROS_FILE *stream);
     ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:213:9: error: conflicting types for 'fgets'
 char *  _EXFUN(fgets, (char *__restrict, int, FILE *__restrict));
         ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:945:7: note: previous declaration of 'fgets' was here
 char* fgets(char *str, int num, PROS_FILE *stream);
       ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:214:5: error: conflicting types for 'fputc'
 int _EXFUN(fputc, (int, FILE *));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:989:5: note: previous declaration of 'fputc' was here
 int fputc(int value, PROS_FILE *stream);
     ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:215:5: error: conflicting types for 'fputs'
 int _EXFUN(fputs, (const char *__restrict, FILE *__restrict));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:999:5: note: previous declaration of 'fputs' was here
 int fputs(const char *string, PROS_FILE *stream);
     ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:223:8: error: conflicting types for 'fread'
 size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
        ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:1011:8: note: previous declaration of 'fread' was here
 size_t fread(void *ptr, size_t size, size_t count, PROS_FILE *stream);
        ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:224:8: error: conflicting types for 'fwrite'
 size_t _EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
        ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:1041:8: note: previous declaration of 'fwrite' was here
 size_t fwrite(const void *ptr, size_t size, size_t count, PROS_FILE *stream);
        ^~~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:230:5: error: conflicting types for 'fseek'
 int _EXFUN(fseek, (FILE *, long, int));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:1021:5: note: previous declaration of 'fseek' was here
 int fseek(PROS_FILE *stream, long int offset, int origin);
     ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:236:6: error: conflicting types for 'ftell'
 long _EXFUN(ftell, ( FILE *));
      ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:1029:10: note: previous declaration of 'ftell' was here
 long int ftell(PROS_FILE *stream);
          ^~~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:239:5: error: conflicting types for 'feof'
 int _EXFUN(feof, (FILE *));
     ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:909:5: note: previous declaration of 'feof' was here
 int feof(PROS_FILE *stream);
     ^~~~
In file included from /usr/arm-none-eabi/include/stdlib.h:11:0,
                 from ../include/API.h:25,
                 from ../include/main.h:31,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
/usr/arm-none-eabi/include/stdio.h:243:8: error: conflicting types for 'fopen'
 FILE * _EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type));
        ^
In file included from ../include/main.h:31:0,
                 from ../include/functions.h:3,
                 from opcontrol.c:1:
../include/API.h:969:13: note: previous declaration of 'fopen' was here
 PROS_FILE * fopen(const char *file, const char *mode);
             ^~~~~
make[1]: *** [Makefile:44: ../bin/opcontrol.o] Error 1
make: *** [Makefile:51: src] Error 2

Steps to reproduce:

Type #include <stdio.h> in main.h

System information:

Kernel Version: 2.12.1
OS: Arch Linux Antergos

Additional Information

functions.h is just a header file I made containing my functions.

Arch Linux Install Script Dependency Missing

I installed pros while running arch linux and attempted to build a project, but the compiler failed because it was missing an stdlib.h file. After doing some research, installing the "arm-none-eabi-newlib" package fixes the issue because that is the package that provides the arm standard library. That package is an optional dependency of the arm gcc toolkit, but is not automatically installed by the install script. It should be added for the next release.

C++ Global Constructor Never Called

Expected Behavior:

When a C++ object is declared to be global, rather than inside a function, its constructor is not called.

Actual Behavior:

The object remains uninitialized.

In this example:

Expected output:

Test constructor
opcontrol
test: 3

Actual output:

opcontrol
test: 0

Steps to reproduce:

Using the default template, replace opcontrol.c with opcontrol.cpp:

#include "main.h"

class test {
public:
	test();
	int y;
};

test::test()
{
	y = 3;
	printf("Test constructor\n");
}

test x;

void operatorControl() {
	printf("opcontrol\n");
	printf("test: %d\n", x.y);

	while (1) {
		delay(20);
	}
}

System information:

Kernel Version: 2.11.1

Extend task_notify_when_deleting to support task_to_notify dying before target_task dies

Currently, something bad will happen if task_to_notify dies before target_task dies (@edjubuh feel free to elaborate on what would happen). This means that I don't consider it usable in an OkapiLib release until nothing bad happens (nothing happening at all is a fine option, if task_to_notify is dead, just don't notify it!).

The code area we will need to look at is:

task_notify_when_deleting_hook(task);

One proposal is to run a check to see if the task is still alive and only notify it if it's in the expected state; however, an implementation problem with this is that TCBs can get reused, so we will have to implement something ourselves to track whether a task has been deleted. This could be done through a resizable data structure on the heap which stores an alive bit per task. This bit could be used in a lookup inside the hook so it does nothing.

Option to delete all files in folder and create project

Wanted Behavior:

PROS should have the option to delete all files in a directory and create a project (yes / no / prompt me every time). PROS should still fail if the directory has sub-directories in it (because it would probably be a mistake).

Actual Behavior:

PROS gives an error: Destination is a file or a nonempty directory!. The directory in question was a newly created Google Drive folder which had an automatically created desktop.ini file in it.

Cannot change options using LVGL

Expected Behavior:

Able to change options in a dropdown list drawn with LVGL

Actual Behavior:

Option never changes, and there is significant lag (though that may be unavoidable depending on how fast the v5 brain is)

Steps to reproduce:

Following code:

lv_obj_t * tv = lv_tabview_create(lv_scr_act(), NULL);

lv_obj_t * tab1 = lv_tabview_add_tab(tv, "Auton");
lv_obj_t * tab2 = lv_tabview_add_tab(tv, "Side");
lv_obj_t * tab3 = lv_tabview_add_tab(tv, "Other");

// Label for current auton
lv_obj_t * autonStringsHolder = lv_cont_create(tab1, NULL);
lv_obj_set_size(autonStringsHolder, lv_obj_get_width(tab1) / 2, 2 * lv_obj_get_height(tab1) / 3);
lv_obj_align(autonStringsHolder, NULL, LV_ALIGN_IN_RIGHT_MID, 0, LV_DPI / 4);
lv_page_set_style(autonStringsHolder, LV_PAGE_STYLE_BG, &lv_style_transp_fit);

lv_obj_t * autonLabelLabel = lv_label_create(autonStringsHolder, NULL);
lv_label_set_text(autonLabelLabel, "Current autonomous: ");
lv_obj_align(autonLabelLabel, NULL, LV_ALIGN_CENTER, 0, -10);

autonLabel = lv_label_create(autonStringsHolder, NULL);
lv_label_set_text(autonLabel,  "undefined");
lv_obj_align(autonLabel, NULL, LV_ALIGN_CENTER, 0, 10);

// Play with a list
lv_obj_t * ddlist = lv_ddlist_create(tab1, NULL);
lv_obj_set_size(ddlist, lv_obj_get_width(tab1) / 2, 2 * lv_obj_get_height(tab1) / 3);
lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_LEFT, 0, LV_DPI / 4);

lv_ddlist_set_options(ddlist,
  "High and Low Flag\n"
  "Mid and Low Flag\n"
  "Platform only\n"
  "None\n");
lv_ddlist_set_action(ddlist, list_btn_action);

System information:

Kernel Version: 3.1.3

Additional Information

This is from another task. I haven't tested it yet on the main thread, since I'd like to update the display from another thread.

Windows Toolchain uses 64-bit binaries

Toolchain works for 32-bit and 64-bit systems. The new toolchain accidentally snuck in 64-bit binaries, so need to rebuild the toolchain.

Reported from a PROS Development email.

Current workaround is to install old toolchain (gcc-toolchain-win-old.zip from the 2.11.1 release) and update C:\Program Files\PROS\toolchain\usr appropriately.

โœจ Add More Unit Tests

Unit tests are great for finding bugs and regressions, but these may be hard to automate

I propose linking all the unit tests together into a single binary, have a script automatically download this to a cortex, select the unit test using debug stream, reboot the cortex using the bootloader if it gets stuck, and repeat this for every unit test until they all pass or one fails

printf not working without newline

Expected Behavior:

printf will print to the serial port without a newline in its format string

Actual Behavior:

nothing happens

Steps to reproduce:

call printf in a PROS c project from any source file

System information:

I'm using PROS 3.1.1 on a V5 running firmware 1.0.2.

Ability to import <cmath> in C++

Expected Behavior:

The ability to do #import <cmath> in a C++ project and use functions such as log() and floor() without needing to reimplement them in my own code.

Actual Behavior:

There are issues due to duplicate declarations

Steps to reproduce:

Insert import <cmath> into any file.

System information:

Kernel Version: 2.12.1

Additional Information

Using Windows 10, build 1709

Cannot open linker script file STM32F10x.ld

I have resolved the issue myself, but I thought it would be good to bring to your attention.

Expected Behavior:

Running make in the template directory after running build.sh will successfully compile the template project.

Actual Behavior:

CC -I../include -I../src opcontrol.c
CC -I../include -I../src init.c
CC -I../include -I../src auto.c
LN ./bin/auto.o ./bin/init.o ./bin/opcontrol.o ./firmware/libpros.a -lgcc -lm to bin/output.elf
/usr/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/bin/ld: cannot open linker script file STM32F10x.ld: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:60: bin/output.elf] Error 1

Steps to reproduce:

Clone the git repository, run build.sh, then run make.

Steps to resolve:

On line 2 of pros/template/firmware/firmware/cortex.ld, change
INCLUDE "STM32F10x.ld" to INCLUDE "firmware/STM32F10x.ld"

System information:

Arch Linux
arm-none-eabi-gcc gcc version 7.3.0 (Arch Repository)
pros, version 2.6.1

Atom - can't create a new project

Expected Behavior:

I tried creating a new project in Atom (I have atom, python 3.6, and have downloaded and installed the macos package for pros) I dont think I have clang but once I downloaded it I was pretty much lost (what do I do now?).

Actual Behavior:

no new project, the error says that the issue has already been reported purduesigbots/pros-atom#37
but this doesn't seem to be the issue
this seems closer
purduesigbots/pros-atom#6

Steps to reproduce:

//

System information:

Kernel Version: none
Here is what I think (dont quote be though) seems to be the problem. I have no kernels installed and cannot install any.

I have tried 'pros conduct download' but the responce was:

Fetching online listing to verify available templates.
No templates were found with the name kernel
Aborted!

I am not very familiar with all the terminology that is used and how most things work so I probably did something wrong. But I am lost.

Additional Information

Thank you in advance and sorry

Get list of files on microSD card?

Is this possible from the API? Of course dirent doesn't work, but I see fsScan in PROS source which makes me think it should be possible with some modification.

UART/I2C/SPI over ADI?

Is there currently any way to connect either UART, I2C, or SPI devices over the ADI ports on the V5? Would bit-banged implementations be desired?
Or would this kind of thing be better suited for OkapiLib?

Encoder data error!

image
image
image
image

I think my code is the right line and it's not plugged. But encoder_R's data is two times that of encoder_L.encoder_L's data is right.
I did not modify PINMODE ()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.