purduesigbots / pros Goto Github PK
View Code? Open in Web Editor NEWSource code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
Home Page: https://pros.cs.purdue.edu
License: Other
Source code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
Home Page: https://pros.cs.purdue.edu
License: Other
initialize the vision sensor
Code will not run
create vision sensor instance with pros::Vision(port)
upload code
error
Kernel Version: 3.1.5
Windows 64-bit
virtual compiler target
LVGL is the latest version.
LVGL is not the latest version.
Try using 5.2 and 5.3 features (LVGL docs have all been updated to 5.3-specific info) with PROS ๐
Platform: V5
PROS Kernel Version: any
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
N/A
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
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 #define
s to use static const
instead and putting all the pros API functions into a namespace
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
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.
Download pros-win.exe from https://pros.cs.purdue.edu/, and then run it.
OS: Windows 7 Professional Service Pack 1
Kernel Version: Pros 0.7.0
Workaround:
Atom should detect PROS CLI
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
Kernel Version: 3.18.0-14861-g70c266fc4519
OS: Crouton
Model: HP 11 G5 (4GB RAM version)
I think that this may be an Atom issue because it seems like Atom isn't seeing the environmental variables set in ~/.bashrc
.
Could vasprintf() return buffer that is smaller than 16 bytes?
It is, probably, a good idea to check return value vasprintf() which is guaranteed to allocate only number of printed bytes + 1.
Line 248 in bc0fa3e
pros flash
should flash the program
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'
On my computer I just run pros flash in any folder
Operating System: (Windows, OS X, Ubuntu)
Arch Linux (Antergos)
PROS Version: (run pros --version
)
pros, version 2.6.1
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
The VEX Ultrasonic sensor should always return a reasonable value for the distance
I'm seeing a zero value about every 50ms in between the correct values.
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
}
}
}
mac os 10.12.6
Kernel Version:
2.12
void autonomous() {
motorSet(rightFront, 127);
}
Kernel Version: 2.12.1
Windows 8.1
How do I initialize my autonomous function so it runs once the competition switch is flipped to autonomous?
Motor is defined in main.h.
Direct use of printf always shows errors. I would like to invite you to recommend a Bluetooth chip that can be connected to UART port, so that I can make it easier when I debug. Thank you.
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!
Kernel Version:
Kernel Version: 2.12.1
Windows 10.1
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);
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:
CPP-GUIDELINES.md
I would be happy to make a PR either here or on the docs, if the maintainers would be supportive of such documentation.
Prose Builds correctly
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
open project then click build and open PowerShell window
Kernel Version:
1.21.2
computer running windows 10 version 1151 32bit
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.
I have been using the AUTOCOMPLETE plug-in, the plug-in can ignore the size of write completion. But it seems that PROS and conflict. If I want to use the auto complete AUTOCOMPLETE plugin to replace PROS built-in, how to set up?
There are a lot of stale branches which we don't need to keep around anymore that should be deleted.
For the pros-editor.deb to make a shortcut
doesn't make a shortcut
just install the .deb file
Ubuntu 18.10, this happens on any Ubuntu version
Kernel Version: 4.18.0-10
When you install the pros-editor.deb, it doesn't produce a application shortcut like most programs do.
Option to sign in to GitHub appears when the GitHub tab is opened.
GitHub tab is blank. (see screenshot)
-Open the PROS Editor
-Select 'Packages'
-Select 'GitHub'
-Select 'Toggle GitHub Tab'
Platform: V5 C++
PROS Kernel Version: 3.1.5
-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'.
screenshot from pros editor
screenshot from atom through github
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.
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.
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.
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! :)
N/A
Kernel Version: 4.2.0-42-generic
atom
Version: 1.32.0
git
Version: 1.9.1
If I need to move this issue to another repo, please let me know.
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 Version:
Expected it to work for admin and non-admin user.
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.
Kernel Version:
Windows 10.
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.
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.
Kernel Version: 2.6.1
Using STL to read and write files
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.
Operating System: (Windows, OS X, Ubuntu)
windows 10 1803
PROS Version: (run pros --version
)
pros, version 3.1.2
kernel 3.3.4
oklib 3.3.7
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.
API.H would not conflict with stdio
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
Type #include <stdio.h>
in main.h
Kernel Version: 2.12.1
OS: Arch Linux Antergos
functions.h is just a header file I made containing my functions.
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.
When a C++ object is declared to be global, rather than inside a function, its constructor is not called.
The object remains uninitialized.
In this example:
Expected output:
Test constructor
opcontrol
test: 3
Actual output:
opcontrol
test: 0
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);
}
}
Kernel Version: 2.11.1
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:
Line 916 in 4eb9ea0
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.
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).
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.
Ironically, the links under "I think I found a bug!" are broken.
Able to change options in a dropdown list drawn with LVGL
Option never changes, and there is significant lag (though that may be unavoidable depending on how fast the v5 brain is)
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);
Kernel Version: 3.1.3
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.
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.
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
will print to the serial port without a newline in its format string
nothing happens
call printf
in a PROS c project from any source file
I'm using PROS 3.1.1 on a V5 running firmware 1.0.2.
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.
There are issues due to duplicate declarations
Insert import <cmath>
into any file.
Kernel Version: 2.12.1
Using Windows 10, build 1709
EASYC is the main controller and the remote controller need to brush special firmware. Does PROS need? I doubt that my TASK is always the data error, because no update to the latest version of the firmware. The key to my remote or in the use of EASYC firmware.
I have resolved the issue myself, but I thought it would be good to bring to your attention.
Running make
in the template directory after running build.sh
will successfully compile the template project.
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
Clone the git repository, run build.sh
, then run make
.
On line 2 of pros/template/firmware/firmware/cortex.ld, change
INCLUDE "STM32F10x.ld"
to INCLUDE "firmware/STM32F10x.ld"
Arch Linux
arm-none-eabi-gcc gcc version 7.3.0 (Arch Repository)
pros, version 2.6.1
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?).
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
//
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.
Thank you in advance and sorry
IMEs have issues with sending static to the Cortex and crashing the user processor. RobotC apparently uses a watchdog timer to detect this and reset the Cortex as necessary: https://www.vexforum.com/index.php/conversation/post/202239
Could PROS have such a feature built-in as well?
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.
The v5 controller has a haptic motor. PROS cannot use this motor.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.