Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishamm committed May 15, 2020
2 parents 0c24a32 + 1cb859a commit b6279bc
Show file tree
Hide file tree
Showing 711 changed files with 275,503 additions and 63,480 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The following command-line arguments are available:
- `-u`, `--update`: Update RepRapFirmware and exit. This works even if another instance is already started
- `-l`, `--log-level`: Set the minimum log level. Valid options are: `trace`, `debug` , `info` , `warn`, `error`, `fatal`, `off` Default is `info`
- `-c`, `--config`: Override the path to the JSON configuration file. Defaults to `/opt/dsf/conf/config.json`
- `-r`, `--no-reset-stop`: Do not terminate this application when M999 has been processed
- `-S`, `--socket-directory`: Override the path where DCS creates UNIX sockets. Defaults to `/var/run/dsf`
- `-s`, `--socket-file`: Override the filename of DCS's UNIX socket. Defaults to `dcs.sock`
- `-b`, `--base-directory`: Set the base directory of the virtual SD card directoy. This is used for RepRapFirmware compatibility. Defaults to `/opt/dsf/sd`
Expand All @@ -83,7 +84,7 @@ More technical documentation about this can be found [here](https://chrishamm.gi

### Inter-Process Communication

DuetControlServer provides a UNIX socket for inter-process commmunication. This socket usually resides in `/var/log/dsf/dcs.sock` .
DuetControlServer provides a UNIX socket for inter-process commmunication. This socket usually resides in `/var/run/dsf/dcs.sock` .
For .NET Core, DSF provides the `DuetAPIClient` class library which is also used internally by the DSF core applications.

Technical information about the way the communication over the UNIX socket works can be found in the [API description](#api).
Expand Down Expand Up @@ -357,18 +358,25 @@ sudo systemctl restart sshd
sudo passwd
```

After that, open a new console in one of the DSF application directories (where a .csproj file lies) and run
Then make sure to shut down all the DSF components before you continue, else you may get errors:

```
dotnet publish-ssh -r linux-arm --ssh-host duet3 --ssh-user root --ssh-password raspberry --ssh-path /opt/dsf/bin
sudo systemctl stop duetcontrolserver
sudo systemctl stop duetwebserver
```

After that, open a new local console in one of the DSF application directories (where a .csproj file lies) and run:

```
dotnet publish-ssh -r linux-arm --ssh-host duet3 --ssh-user root --ssh-password raspberry --ssh-path /opt/dsf/bin /p:DefineConstants=VERIFY_OBJECT_MODEL
```

This will replace the stock DSF component with your own compiled variant. Make sure to shut down all the DSF components before you do this, else you may get errors.
This will replace the stock DSF component with your own compiled variant.
If you do not wish to publish everything to your board at the time of compiling, have a look at the `dotnet publish` command.

### 3.2 Building on the SBC itself

Of course you can compile the required components on the SBC itself. Once the .NET Core SDK has been installed, enter the directory of the DSF appliction you want to compile and run `dotnet build`. This will generate suitable binaries for you.
Of course you can compile the required components on the SBC itself. Once the .NET Core SDK has been installed, enter the directory of the DSF application you want to compile and run `dotnet build`. This will generate suitable binaries for you.

## API

Expand Down Expand Up @@ -619,13 +627,10 @@ The following third-party bindings are available:

To ensure flawless operation of the most critical components, Duet Software Framework relies on unit tests via the NUnit framework. These unit tests can be found in the [src/UnitTests](/src/UnitTests) directory.

## Known issues
## Known incompatibilities

- `killall` may not be used to terminate DuetControlServer. Since it sends SIGTERM to all processes including worker threads of the .NET task scheduler, an abnormal program termination is the consequence. It is better to send SIGTERM only to the main PID
- G-Code checksums and M998 are currently not supported
- M291 S2/S3 are not working yet
- Object model is only partially populated
- Some G-codes behave differently when executed directly by RepRapFirmware instead of DCS
- G-Code checksums and M998 are not supported

## Reporting issues

Expand All @@ -639,5 +644,5 @@ To launch DuetControlServer with this log level on DuetPi, you may run the follo

```
sudo systemctl stop duetcontrolserver
sudo /opt/dsf/bin/DuetControlServer --log-level debug
sudo /opt/dsf/bin/DuetControlServer -l debug -r
```
164 changes: 164 additions & 0 deletions WHATS_NEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
Summary of important changes in recent versions
===============================================

Version 3.1.0
==============

Compatible files:
- RepRapFirmware 3.1.0
- DuetWebControl 3.1.0

Changed behaviour:
- Duplicate code parameters are now ignored
- If M122 cannot obtain locks in DCS within 2s, the lock is ignored
- SPI poll delay is skipped during updates

Bug fixes:
- When pausing a print at the end of a file, the file was closed on resume
- M500 P10 did not work
- DCS parameter for updates (-u) was broken if another instance was not started
- Whole-line comments were not truncated before they were sent to RRF
- Only the first filament usage was parsed from files generated by Prusa Slicer
- M505 did not return the current sys directory when invoked without parameters
- Whole-line comments preceding a code that requests a macro file could cause the code to be executed twice

Version 2.2.0
==============

Compatible files:
- RepRapFirmware 3.01-RC12
- DuetWebControl 2.1.7

Changed behaviour:
- Changed letter of unprecedented parameters from '\0' to '@'
- Increased default and minimum API version number to 7
- Whole line comments are now sent to RepRapFirmware

Known issues:
- Print/Simulation times are not written to G-code files
- Codes with invalid expressions may not instantly terminate a macro or job file

Bug fixes:
- Expressions in square brackets were not evaluatated
- M500 wrote workplace coordinates without offsetting the indices by 1

Version 2.1.3
==============

Compatible files:
- RepRapFirmware 3.01-RC11
- DuetWebControl 2.1.6

Changed behaviour:
- Warning message is shown in the DCS log when API clients with an old version number connect

Known issues:
- Print/Simulation times are not written to G-code files
- Comments for object cancellation detection are not parsed (work-around is to use M486 directly)
- Codes with invalid expressions may not instantly terminate a macro or job file

Bug fixes:
- Unchanged arrays could be reported in Patch subscription mode
- Initial query in Patch mode was not working
- Web server did not clear HTTP endpoints under certain circumstances
- echo expressions were not parsed correctly if strings contained commas
- Changing the system time just before a controller reset could lead to an abnormal program termination

Version 2.1.2
==============

Compatible files:
- RepRapFirmware 3.01-RC10
- DuetWebControl 2.1.5

Known issues:
- Print/Simulation times are not written to G-code files
- Comments for object cancellation detection are not parsed (work-around is to use M486 directly)
- Codes with invalid expressions may not instantly terminate a macro or job file

Bug fixes:
- Leading G53 wasn't added to string representations of parsed codes
- Starting DCS with the fifo CPU scheduler via systemd could lead to maximum CPU usage
- Some nullable RRF OM fields were not declared as such in the DSF OM

Version 2.1.1
==============

Compatible files:
- RepRapFirmware 3.01-RC10
- DuetWebControl 2.1.5

Changed behaviour:
- If DCS cannot establish a connection to RRF, the error message is always printed
- Code parser exceptions report the filename
- File info parser scans parsed comments in the file footer like in the file header
- Increased priority in systemd service for DCS and start it at `basic.target` instead of `multi-user.target`

Known issues:
- Print/Simulation times are not written to G-code files
- Comments for object cancellation detection are not parsed (work-around is to use M486 directly)
- Codes with invalid expressions may not instantly terminate a macro or job file

Bug fixes:
- Expression code parameters were not properly printed in the log
- Double quotes were incorrectly parsed
- limits key was not updated in the object model
- Height map file was overwritten by the RepRapFirmware object model
- G29 S1/M375 didn't print an offset warning when a heightmap was loaded without homing Z first
- Order of M0/M1 and notification about the print being cancelled was wrong
- Some internal fields of the Code object were incorrectly serialized
- Codes could finish in the wrong order
- PrusaSlicer print time and layer height were not parsed correctly
- Expression fields were always evaluated from the DSF object model

Version 2.1.0
==============

Compatible files:
- RepRapFirmware 3.01-RC9
- DuetWebControl 2.1.4

Changed behaviour:
- Implemented conditional G-code according to https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands (same command set as supported by RRF)
- DuetAPI version number has been increased, however the previous one is still accepted
- DuetAPI uses relaxed JSON escaping like in the DCS settings file
- Added new fields stepsPerMm and microstepping to Axis amd Extruder items to DuetAPI
- Increased maximum size of messages being sent to the firmware from 256 bytes to 4KiB
- Removed SpiPollDelaySimulating and renamed SpiPollDelaySimulating to FileBufferSize in the DCS settings (the latter is now used for code files, too)
- Simple text-based codes no longer report when they are cancelled

Known issues:
- Print/Simulation times are not written to G-code files
- Comments for object cancellation detection are not parsed (work-around is to use M486 directly)

Bug fixes:
- DuetControlServer could sporadically hang when printing a file
- Fixed deadlock that could occur when the SPI task tried to resolve pending requests
- M20 was not fully compatible with RRF
- Concatenating code parser exception caused the line to be appended multiple times
- Filament sensors and move.kinematics were neither properly updated nor serialized
- Codes of macros being cancelled were sometimes aborted with a wrong exception

Version 2.0.0
==============
Compatible files:
- RepRapFirmware 3.01-RC8
- DuetWebControl 2.1.3

Changed behaviour:
- M999 stops DCS. This behaviour can be changed by starting it with the `-r` command-line argument or by changing the config value `NoTerminateOnReset` to `true`
- Plugins using prior API versions are no longer compatible and require new versions of the API libraries
- Codes M21+M22 are not supported and will throw an error
- Code expressions are now preparsed and Linux object model fields are substituted before the final evaluation

Known issues:
- Conditional G-codes (aka meta commands) except for echo are not supported yet
- Print/Simulation times are not written to G-code files
- Comments for object cancellation detection are not parsed (work-around is to use M486 directly)

Bug fixes:
- Added compatibility for G-code meta expressions
- When all macros were aborted the messages were not properly propagated to the start code(s)
- Some codes were incorrectly sent when aborting all files
- Some macro codes could be executed in the wrong order when multiple macros were invoked
- Code requests from the firmware could cause a deadlock
Loading

0 comments on commit b6279bc

Please sign in to comment.