I decided that I’m a massochist and will attempt to make my own prop file for version 6 but I am woefully ignorant as to how it is written. my limited knowledge of code and I have reviewed the comments section and my plan is as follows, to remove the choreography mode and use the following button combos.
click pwr
double click pwr
triple click pwr
quad click pwr
pwr + twist
pwr + swing
twist
pwr + clash
pwr + twist R
pwr + twist L
twist R
twist L
I did edit the write up on the prop file if that helps but I ran out of keypresses and needed to not use the choreography mode, but I was wondering is it too hard to remove the choreography or just have it there but not assign the single button IF statements for the choreography and just not use it?
I thought if you have it in the prop file without a button combination for 1 it would fail to compile?
My prop is still in flux so I wouldn’t do anything yet. I have several PRs in the works for some bug fixes and clean up.
You can remove choreography by excluding the code within the #ifdef FETT263_SAVE_CHOREOGRAPHY
You won’t be able to use Twist Right and Left outside of the menu, the movement is too sensitive for normal operation any swing or movement of the saber will trigger. The directional twists only work in a dedicated menu mode.
Power + twist/left right could work while the saber is off to do things, but directed twisting is going to be hard to use while you’re doing a swing or something, so I don’t think it’s a useful control while the saber is on.
Hey @NoSloppy wanted to ask you how the blade detect if I add the #define NO_BLADE_NO_GESTURE and the #define Blade_detect_pin and I compiled my config.
and got this error.
Arduino: 1.8.16 (Linux), Board: "Proffieboard V2, Serial + WebUSB, SDCARD (SPI), 80 MHz, Smallest Code"
ProffieOS:611:42: error: wrong number of template arguments (0, should be 1)
611 | LatchingButtonTemplate<FloatingButtonBase<BLADE_DETECT_PIN>>
| ^
In file included from /home/maxb/Documents/ProffieOS/ProffieOS.ino:575:
/home/maxb/Documents/ProffieOS/buttons/floating_button.h:6:7: note: provided for 'template<int PIN> class FloatingButtonBase'
6 | class FloatingButtonBase {
| ^~~~~~~~~~~~~~~~~~
ProffieOS:611:59: error: template argument 1 is invalid
611 | LatchingButtonTemplate<FloatingButtonBase<BLADE_DETECT_PIN>>
| ^~
ProffieOS:612:54: error: expected primary-expression before ',' token
612 | BladeDetect(BUTTON_BLADE_DETECT, BLADE_DETECT_PIN, "blade_detect");
| ^
ProffieOS:612:70: error: expression list treated as compound expression in initializer [-fpermissive]
612 | BladeDetect(BUTTON_BLADE_DETECT, BLADE_DETECT_PIN, "blade_detect");
| ^
/home/maxb/Documents/ProffieOS/ProffieOS.ino: In function 'void setup()':
ProffieOS:1414:17: error: request for member 'Warmup' in 'BladeDetect', which is of non-class type 'int'
1414 | BladeDetect.Warmup();
| ^~~~~~
exit status 1
wrong number of template arguments (0, should be 1)
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I’m using the last proffieos_master (downloaded yesterday) AND proffieos 5.9
Not sure what you mean you’re using the latest AND 5.9,
but the Blade detect error is because you don’t have an actual pin on the define. It should be the pad that you have wired for blade detect (floating until grounded with blade inserted. Actually could be Positive too but…)
Needs to be something like #define BLADE_DETECT_PIN blade3Pin
or #define BLADE_DETECT_PIN 10
this is just a standard LGT install which I don’t think they have the pad configured in that way. i’ll just continue with the prop file.
which leads me to my next question, I’m doing something wrong (OR A LOT).
I was reading up on the C++ and given my knowledge of linux plus scripts I think I understand how the file is structured but there is a few things I am having issues with.
firstly my compiling has errors.
voila:
Arduino: 1.8.16 (Linux), Board: "Proffieboard V2, Serial + WebUSB, SDCARD (SPI), 80 MHz, Smallest Code"
ProffieOS:1493:1: error: expected '}' at end of input
1493 | }
| ^
In file included from /home/maxb/Documents/ProffieOS/config/INCENDIUS2.h:47,
from /home/maxb/Documents/ProffieOS/ProffieOS.ino:551:
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:617:66: note: to match this '{'
617 | class SaberAFROJEDIButtons : public PROP_INHERIT_PREFIX PropBase {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h: In member function 'virtual void SaberAFROJEDIButtons::Loop()':
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:628:11: error: 'auto_lockup_on_' was not declared in this scope
628 | if (auto_lockup_on_ &&
| ^~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:631:22: error: 'clash_impact_millis_' was not declared in this scope
631 | millis() - clash_impact_millis_ > AFROJEDI_LOCKUP_DELAY &&
| ^~~~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:637:11: error: 'auto_melt_on_' was not declared in this scope
637 | if (auto_melt_on_ &&
| ^~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:640:22: error: 'clash_impact_millis_' was not declared in this scope
640 | millis() - clash_impact_millis_ > AFROJEDI_LOCKUP_DELAY &&
| ^~~~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:651:24: error: 'push_begin_millis_' was not declared in this scope
651 | if (millis() - push_begin_millis_ > AFROJEDI_FORCE_PUSH_LENGTH) {
| ^~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:656:9: error: 'push_begin_millis_' was not declared in this scope
656 | push_begin_millis_ = millis();
| ^~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:660:22: error: 'saber_off_time_' was not declared in this scope
660 | if (millis() - saber_off_time_ < MOTION_TIMEOUT) {
| ^~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:675:24: error: 'thrust_begin_millis_' was not declared in this scope
675 | if (millis() - thrust_begin_millis_ > 15) {
| ^~~~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:680:9: error: 'thrust_begin_millis_' was not declared in this scope
680 | thrust_begin_millis_ = millis();
| ^~~~~~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h: In member function 'void SaberAFROJEDIButtons::VolumeUp()':
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:725:14: error: 'max_vol_reached_' was not declared in this scope
725 | if (!max_vol_reached_) {
| ^~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h: In member function 'void SaberAFROJEDIButtons::VolumeDown()':
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:768:14: error: 'min_vol_reached_' was not declared in this scope
768 | if (!min_vol_reached_) {
| ^~~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h: In member function 'virtual bool SaberAFROJEDIButtons::Event2(BUTTON, EVENT, uint32_t)':
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:803:11: error: 'pointing_down_' was not declared in this scope
803 | pointing_down_ = true;
| ^~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:805:11: error: 'pointing_down_' was not declared in this scope
805 | pointing_down_ = false;
| ^~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:809:25: error: a function-definition is not allowed here before '{' token
809 | void GenerateIniFiles() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:814:43: error: a function-definition is not allowed here before '{' token
814 | Color16 GetColorArg(int blade, int arg) {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:844:19: error: a function-definition is not allowed here before '{' token
844 | void ShowFull() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:853:19: error: a function-definition is not allowed here before '{' token
853 | void ShowPart() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:871:33: error: a function-definition is not allowed here before '{' token
871 | void LengthPreview(int blade) {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:878:21: error: a function-definition is not allowed here before '{' token
878 | void CopyColors() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:892:19: error: a function-definition is not allowed here before '{' token
892 | void SetInOut() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:923:22: error: a function-definition is not allowed here before '{' token
923 | void RevertInOut() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:944:38: error: a function-definition is not allowed here before '{' token
944 | void SayStyleNumber(int style_num) {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:957:29: error: a function-definition is not allowed here before '{' token
957 | void StopSettingPreview() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:976:27: error: a function-definition is not allowed here before '{' token
976 | void SaveStyleSetting() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:985:29: error: a function-definition is not allowed here before '{' token
985 | void CancelStyleSetting() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:996:20: error: a function-definition is not allowed here before '{' token
996 | void EditColor() {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1073:40: error: a function-definition is not allowed here before '{' token
1073 | void NewColor(int blade, int effect) {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1105:25: error: a function-definition is not allowed here before '{' token
1105 | void Setup() override {
| ^
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1109:9: error: 'off_event_' was not declared in this scope
1109 | if (off_event_ && millis() - restart_millis_ > 200) {
| ^~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1109:34: error: 'restart_millis_' was not declared in this scope
1109 | if (off_event_ && millis() - restart_millis_ > 200) {
| ^~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1112:7: error: 'restart_' was not declared in this scope
1112 | restart_ = true;
| ^~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1115:9: error: 'restart_' was not declared in this scope
1115 | if (restart_ && (int)(millis() - restart_millis_) > calc_ + 1000) {
| ^~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1115:38: error: 'restart_millis_' was not declared in this scope
1115 | if (restart_ && (int)(millis() - restart_millis_) > calc_ + 1000) {
| ^~~~~~~~~~~~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1115:57: error: 'calc_' was not declared in this scope
1115 | if (restart_ && (int)(millis() - restart_millis_) > calc_ + 1000) {
| ^~~~~
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:1190:24: error: a function-definition is not allowed here before '{' token
1190 | void Loop() override {
| ^
ProffieOS:1493:1: error: expected '}' at end of input
1493 | }
| ^
In file included from /home/maxb/Documents/ProffieOS/config/INCENDIUS2.h:47,
from /home/maxb/Documents/ProffieOS/ProffieOS.ino:551:
/home/maxb/Documents/ProffieOS/props/saber_afrojedi_buttons.h:797:77: note: to match this '{'
797 | bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
| ^
/home/maxb/Documents/ProffieOS/ProffieOS.ino: At global scope:
ProffieOS:1493:1: error: expected unqualified-id at end of input
1493 | }
| ^
exit status 1
expected '}' at end of input
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I noted earlier my prop is still in flux, there’s a lot of changes in development so you’ll end up needing to redo most of this anyway. I’d recommend waiting for the prop to be finalized as I’m moving functions to a common prop file to make it easier to use and there are other code changes that are being worked on.
As to that error you’re missing a bracket or semi-colon somewhere but there’s probably more to it.
OH yeah, you did, sorry for being impetuous. I’ll tinker with it a little more just to familiarise myself with one button functions. though I think I might just read brians prop file and try to figure out what each line does.
For learning is fine, look through the code for a missing bracket or semi-colon before the line referenced in first error.
But a large portion of my prop is changing so most of what you’ve copied will need to be redone if you try to use as OS6 progresses through Alpha. I’d recommend waiting and using the prop after it’s finalized and tested but you’re free to do as you choose.
This brace is matched at the very end of the file right above the #endif.
It gets a semicolon after it.
Otherwise, you should see what line 1493 is closing or should be.
It’s not possible for someone diagnose a compilation error based only on the output from the compiler. You also need to see the code. When you’re just writing a config file, most errors are fairly predictable, so sometimes it’s possible to figure it out just from the errors themselves, but when writing a prop file, it’s essentially programming, which means it’s not predictable.
Ok So update on my madness. I think I’m understand the differences of that class, variables, statements, functions and objects but I’m reading The prop files and they are super complicated and interconnected. @NoSloppy the Sublime bracket highlighter is really cool. I’m especially liking the high visibility mode but there was a few { that didn’t meet up as according to that feature I was able to find all the other orphaned { but I’m still getting errors, I’m reducing the list though I should be done by my 50th birthday though. Lol