Skip to content

Commit

Permalink
Merge pull request #39 from bdring/main
Browse files Browse the repository at this point in the history
Update from Main
  • Loading branch information
BarbourSmith authored Jan 20, 2024
2 parents 76bc1ff + 0fe7bd2 commit dfa487f
Show file tree
Hide file tree
Showing 204 changed files with 4,748 additions and 7,658 deletions.
21 changes: 19 additions & 2 deletions .github/ISSUE_TEMPLATE/problem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ labels: ["triage"]
body:
- type: markdown
attributes:
value: Please fill in the forms below. The better the information you provide, the better we can help you. Information that you might think is irrelevant is often the key to solving the problem. **If we have to keep asking for information that you should have provided at the outset, we will become annoyed fairly quickly.** The amount of information that we ask for might seem excessive; it is not. We handle several issues a day. We cannot solve problems efficiently if we have to keep going back and forth for the basic information that we need.
value: |
Please search for answers on the [wiki](http://wiki.fluidnc.com) first.
If you don't find an answer, read [this](http://wiki.fluidnc.com/en/support/requesting_help) to help you fill in the forms below. The better the information you provide, the better we can help you. Information that you might think is irrelevant is often the key to solving the problem. **If we have to keep asking for information that you should have provided at the outset, we will become annoyed fairly quickly.** The amount of information that we ask for might seem excessive; it is not. We handle several issues a day. We cannot solve problems efficiently if we have to keep going back and forth for the basic information that we need.
- type: textarea
id: wiki-search
attributes:
label: Wiki Search Terms
description: Tell us some of the wiki search terms that you tried. This could help us improve the wiki.
placeholder: motor limit direction install configuration
validations:
required: true

- type: textarea
id: controller-board
attributes:
Expand Down Expand Up @@ -61,7 +72,7 @@ body:
Paste the startup messages here. You can see them by sending "$ss" from FluidTerm, WebUI Console, or any sender's console.
Look through the messages for any MSG:ERR or MSG:WARN lines. They indicate problems in your config file. You might be able
to solve the problem yourself. **Do not excerpt just the messages you think are revelant.
We need to see everything.**
We need to see everything.** [More info about startup messages](http://wiki.fluidnc.com/en/support/requesting_help#fluidnc-startup-messages)
placeholder: <Paste startup messages here>
render: text
validations:
Expand All @@ -80,6 +91,12 @@ body:
placeholder: I did something, expected this, and that happened
validations:
required: true
- type: textarea
id: gcode-file
attributes:
label: GCode File
description: If the problem occurs when running a GCode file, attach it here (with a .txt extension), or paste it if it is short. If you can find a short file that exhibits the problem, it will be easier for us to debug.
placeholder: Paste or attach GCode here
- type: textarea
id: other-info
attributes:
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: FluidNC Continuous Integration
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
pio_env:
- noradio
- wifi
- bt
# - wifibt
# - debug
pio_env_variant:
- ""
# - "_s2"
# - "_s3"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Build target ${{ matrix.pio_env }}${{ matrix.pio_env_variant }}
run: pio run -e ${{ matrix.pio_env }}${{ matrix.pio_env_variant }}

tests:
strategy:
matrix:
include:
- os: ubuntu-latest
pio_env: tests
- os: macos-latest
pio_env: tests
- os: windows-latest
pio_env: tests_nosan
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Windows has issues running gtest code with the included gcc, so install
# MSYS2 and use that instead (remember to add it to the path)
- if: matrix.os == 'windows-latest'
name: Install MSYS2 (Windows)
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
location: D:\
install: mingw-w64-ucrt-x86_64-gcc
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: platformio-${{ runner.os }}

# Separate run task for Windows, since it has issues with the included gcc
- if: matrix.os == 'windows-latest'
name: Run tests (Windows)
run: |
$env:PATH = "D:\msys64\mingw64\bin;D:\msys64\usr\bin;D:\msys64\ucrt64\bin;" + $env:PATH
pio test -e ${{ matrix.pio_env }} -vv
- if: matrix.os != 'windows-latest'
name: Run tests
run: pio test -e ${{ matrix.pio_env }} -vv
12 changes: 12 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ jobs:
release/*.zip
release/*.elf
draft: True
- name: Deploy to fluidnc-releases
uses: datalbry/copy_folder_to_another_repo_action@1.0.0
env:
API_TOKEN_GITHUB: ${{ secrets.RELEASE_COPY_TOKEN }}
with:
source_folder: 'release/current'
destination_repo: 'bdring/fluidnc-releases'
destination_branch: 'main'
destination_folder: releases/${{ github.event.inputs.tag }}
user_email: bdring@buildlog.net
user_name: 'Bart Dring'
commit_msg: Release ${{ github.event.inputs.tag }}
# - name: Upload mac bundle
# uses: actions/upload-artifact@v2
# with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ build/
dist/
*.cppx
*.hx
/compile_commands.json
Binary file modified FluidNC/data/index.html.gz
Binary file not shown.
1 change: 1 addition & 0 deletions FluidNC/esp32/PwmPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static uint8_t calc_pwm_precision(uint32_t frequency) {
}

PwmPin::PwmPin(Pin& pin, uint32_t frequency) : _frequency(frequency) {
log_info("....PwnPin Create");
uint8_t bits = calc_pwm_precision(frequency);
_period = (1 << bits) - 1;
_channel = allocateChannel();
Expand Down
52 changes: 52 additions & 0 deletions FluidNC/esp32/StartupLog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) 2023 - Mitch Bradley
// Use of this source code is governed by a GPLv3 license that can be found in the LICENSE file.

#include "src/StartupLog.h"
#include "src/Protocol.h" // send_line()
#include <sstream>

// The startup log is stored in RTC RAM that is preserved across
// resets. That lets us show the previous startup log if the
// system panics and resets.

// The size is limited by the size of RTC RAM minus system usage thereof
static const size_t _maxlen = 7000;
static RTC_NOINIT_ATTR char _messages[_maxlen];
static RTC_NOINIT_ATTR size_t _len;
static bool _paniced;

void StartupLog::init() {
if (esp_reset_reason() == ESP_RST_PANIC) {
_paniced = true;
} else {
_paniced = false;
_len = 0;
}
}
size_t StartupLog::write(uint8_t data) {
if (_paniced || _len >= _maxlen) {
return 0;
}
_messages[_len++] = (char)data;
return 1;
}
void StartupLog::dump(Channel& out) {
if (_paniced) {
log_error_to(out, "Showing startup log from previous panic");
}
for (size_t i = 0; i < _len;) {
std::string line;
while (i < _len) {
char c = _messages[i++];
if (c == '\n') {
break;
}
line += c;
}
log_to(out, line);
}
}

StartupLog::~StartupLog() {}

StartupLog startupLog;
35 changes: 35 additions & 0 deletions FluidNC/esp32/coredump.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright 2022 Mitch Bradley
// Use of this source code is governed by a GPLv3 license that can be found in the LICENSE file.
//
// Noop replacements for ESP-IDF coredump routines.
// This suppresses complaints about not being able to find a coredump partition.
// We don't want to waste space for such a partition, and the Arduino Framework
// enables coredumps. We override that by stubbing out these routines.

#include <stddef.h>
#include "esp_err.h"
#include "esp_private/panic_internal.h"
#include "esp_core_dump_summary_port.h"

#ifdef __cplusplus
extern "C" {
#endif

void esp_core_dump_init(void) {}

void esp_core_dump_flash_init(void) {}
void esp_core_dump_to_flash(void* info) {}

esp_err_t esp_core_dump_image_check(void) {
return ESP_ERR_NOT_FOUND;
}
esp_err_t esp_core_dump_image_get(size_t* out_addr, size_t* out_size) {
return ESP_ERR_NOT_FOUND;
}
esp_err_t esp_core_dump_image_erase(void) {
return ESP_OK;
}

#ifdef __cplusplus
}
#endif
Loading

0 comments on commit dfa487f

Please sign in to comment.