Skip to content

Commit

Permalink
Fix white lights appearing after inactivity timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-fabteam committed May 15, 2018
1 parent dad1c65 commit 7bb1af7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ applet/
.gtrr_out
/docs/
/wiki/
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
21 changes: 21 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3851,6 +3851,24 @@ void process_commands()
}
}
break;

/**
* Command: M85
*
* Set max inactivity timeout
*
* --- Prototype ---
* M85 S<max_inactive_time_s>
* -----------------
*
* Parameters:
* max_inactive_time_s - Inactivity timout in seconds
*
* Description:
* Sets the inactivity timeout. If no command is received during
* this lapse of time, various outputs are disabled.
*
*/
case 85: // M85
if (code_seen('S')) {
max_inactive_time = code_value() * 1000;
Expand Down Expand Up @@ -7284,6 +7302,9 @@ void manage_inactivity()
Laser::disable();
#endif

// Store current color to flush the default white from popping up after reactivation
store_last_amb_color();

// warning
RPI_ERROR_ACK_ON();
ERROR_CODE=ERROR_IDLE_SAFETY;
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

FABlin Firmware
===============
FABlin Firmware
=====================
for **FABtotum Personal Fabricator** and **FABtotum Core** platforms

This is FABlin, a Marlin derivative firmware. Marlin was originally
Expand All @@ -16,8 +16,8 @@ Compiling

### with Arduino IDE

To correctly compile the firmware with Arduino you must set the folder
where this repository is checked out as Arduino's *sketchbook folder*
To correctly compile the firmware with Arduino you must set the
repository root foler as Arduino's *sketchbook folder*
inside Arduino's preferences. Alternatively you can manually copy the
[FABlin/libraries/SmartComm](libraries/SmartComm) folder into your
current sketchbook's *libraries* folder.
Expand All @@ -31,7 +31,7 @@ https://www.arduino.cc/en/Guide/Environment#toc7.
A default `platformio.ini` file with correct directories definitions is
now included in the repository. To compile the firmware simply run:

platformio run
platformio run

inside this repository's root folder. To upload the firmware on the board
or flash it directly into it refer to
Expand All @@ -40,7 +40,7 @@ or flash it directly into it refer to
programmer. To directly flash the firmware onto TOTUMduino using that
defintion, run:

platformio run -t program
platformio run -t program


Latest Changes
Expand Down Expand Up @@ -88,7 +88,7 @@ For the complete changelog, see [ChangeLog](ChangeLog.txt).
Contributors
------------

FABlin is possible thanks to the contributions by:
FABlin is possible thanks to work and contributions by:

- Simone Cociancich
- Marco Rizzuto
Expand Down

0 comments on commit 7bb1af7

Please sign in to comment.