Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update owl without hotfixes #121

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions gen_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
echo "Generating parser..."
if [[ "language.owl" -nt main/parser.h ]]
then
echo "This generator does not include changes from PRs #107 and #112 and should not be used."
exit 1

pushd owl
make
popd
Expand All @@ -18,11 +15,6 @@ then
exit 1
fi

# remove minimum size of 4096 bytes (see https://github.com/zauberzeug/lizard/issues/23)
sed -i '' 's/while (n < size \|\| n < 4096)/while (n < size)/g' main/parser.h

# increase RESERVATION_AMOUNT to 11 (see https://github.com/zauberzeug/field_friend/issues/7)
sed -i '' 's/#define RESERVATION_AMOUNT 10/#define RESERVATION_AMOUNT 11/g' main/parser.h
else
echo "Nothing to do."
fi
2 changes: 1 addition & 1 deletion main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ idf_component_register(
INCLUDE_DIRS "." "compilation" "modules" "utils" "${CMAKE_BINARY_DIR}/generated"
REQUIRES driver esp_wifi esp_timer efuse lwip esp_event esp_netif esp_adc esp32-ble-command esp32-zeug esp32-serial-flasher app_update esp_driver_uart esp_https_ota spi_flash
)

add_compile_definitions(OWL_TOKEN_RUN_LENGTH=256)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to just add the #define OWL_TOKEN_RUN_LENGTH 256 to the main.cpp before loading parser.h, but it did get ignored.
I found two ways that work:

  1. adding the #define OWL_TOKEN_RUN_LENGTH 256 to parser.c
  2. adding add_compile_definitions(OWL_TOKEN_RUN_LENGTH=256) to the CMakeLists.txt

I chose the latter for now.

component_compile_options(-std=gnu++17 -Wsuggest-override)
set_source_files_properties(parser.c PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers)
Loading