Skip to content

Commit

Permalink
Merge branch 'MK3_sm_MeatPack' into sm_gcode_meatpacking
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmudge committed May 21, 2021
2 parents a81ad68 + 5d35d76 commit d74e562
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Firmware/cmdqueue.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "cmdqueue.h"
#include "cardreader.h"
#include "ultralcd.h"
#include "MeatPack.h"
#include "meatpack.h"

extern bool Stopped;

Expand Down
2 changes: 1 addition & 1 deletion Firmware/cmdqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extern "C" {
// Return True if a character was found
static inline bool code_seen(char code) { return (strchr_pointer = strchr(CMDBUFFER_CURRENT_STRING, code)) != NULL; }
static inline bool code_seen_P(const char *code_PROGMEM) { return (strchr_pointer = strstr_P(CMDBUFFER_CURRENT_STRING, code_PROGMEM)) != NULL; }
static inline float code_value() { return strtod(strchr_pointer+1, NULL);}
static inline float code_value() { return strtod_noE(strchr_pointer+1, NULL);}
static inline long code_value_long() { return strtol(strchr_pointer+1, NULL, 10); }
static inline int16_t code_value_short() { return int16_t(strtol(strchr_pointer+1, NULL, 10)); };
static inline uint8_t code_value_uint8() { return uint8_t(strtol(strchr_pointer+1, NULL, 10)); };
Expand Down
10 changes: 2 additions & 8 deletions Firmware/meatpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Date: Dec. 2020
*/

#include "MeatPack.h"
#include "meatpack.h"

#ifdef ENABLE_MEATPACK

Expand Down Expand Up @@ -80,7 +80,7 @@ uint8_t mp_char_out_count = 0; // Stores number of characters to be read out
#ifdef USE_LOOKUP_TABLE
// The 15 most-common characters used in G-code, ~90-95% of all g-code uses these characters
// NOT storing this with PROGMEM, given how frequently this table will be accessed.
volatile uint8_t MeatPackLookupTbl[16] = {
uint8_t MeatPackLookupTbl[16] = {
'0', // 0000
'1', // 0001
'2', // 0010
Expand Down Expand Up @@ -298,12 +298,6 @@ void FORCE_INLINE mp_handle_cmd(const MeatPack_Command c) {
#ifdef MP_DEBUG
SERIAL_ECHOLNPGM("[MPDBG] DISBL REC");
#endif
} break;
case MPCommand_TogglePacking: {
mp_config ^= MPConfig_Active;
#ifdef MP_DEBUG
SERIAL_ECHOLNPGM("[MPDBG] TGL REC");
#endif
} break;
case MPCommand_ResetAll: {
mp_reset_state();
Expand Down
2 changes: 1 addition & 1 deletion Firmware/MeatPack.h → Firmware/meatpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// some non-0xFF character.
enum MeatPack_Command {
MPCommand_None = 0U,
MPCommand_TogglePacking = 253U,
// MPCommand_TogglePacking = 253U, -- Unused, byte 253 can be re-used later.
MPCommand_EnablePacking = 251U,
MPCommand_DisablePacking = 250U,
MPCommand_ResetAll = 249U,
Expand Down

0 comments on commit d74e562

Please sign in to comment.