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

Fix up MAX31865 / SPI (PT100 & PT1000) support #20074

Merged
merged 17 commits into from
Nov 11, 2020
Merged

Fix up MAX31865 / SPI (PT100 & PT1000) support #20074

merged 17 commits into from
Nov 11, 2020

Commits on Nov 11, 2020

  1. Fixes issue with "temp errors"

    This branch stops the false error message that were being produce from occurring and being sent to SERIAL_PORT. See #19994 (comment).
    
    Added a new ability that when the Adafruit MAX31865 board is checked for faults, the code will now display which of the seven (7) possible faults it found on the SERIAL_PORT with an appropriate error message.  Before it just displayed "Error: temp measurement error MAX6675", which does not indicate the fault condition of the Adafruit MAX31865.  After a fault is found and message is displayed, the code will clear the fault on the board.
    
    Fixed the incorrect temperature being displayed by the Adafruit MAX31865 board connected to TEMP_SENSOR_1.
    This error was caused by the fact that Marlin never instantiated and object for the second Adafruit MAX31865 which meant it was never initialized and the raw data being produced by the board was never getting converted because Marlin did not handle the data coming from the board and convert it to Celsius.  The wrong temperature value was read ~2047 at room temperature.
    
    Marlin did display the correct temperature for the first Adafruit MAX31865 connected to TEMP_SENSOR_0.
    
    Added a new ability that allows the user to use a (PT100 on E0 and a PT1000 on E1) OR (PT1000 on E0 and a PT100 on E1).  To do this I updated the MAX31865_SENSOR_OHMS to MAX31865_SENSOR_OHMS_0.  I also updated  MAX31865_CALIBRATION_OHMS to  MAX31865_CALIBRATION_OHMS_0.  I then added two additional Marlin variables which are used for TEMP_SENSOR_1 called MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1.  With these four Marlin variables, the user can now use a PT100 and a PT1000 on the printer at the same time.
    
    Added a check in SanityCheck.h that check to ensure that MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 are set if TEMP_SENSOR_1 is using the MAX31865 board.
    
    See #19994 (comment).  This branch fixes the "temp errors" being sent to the SERIAL_PORT.
    
    Feature request fullfilled: #19663 (comment)
    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    b2bd547 View commit details
    Browse the repository at this point in the history
  2. Fixed comments that were not needed

    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    2a03000 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c47ca8d View commit details
    Browse the repository at this point in the history
  4. Apply more HAS_MULTI_6675

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    4fddc5c View commit details
    Browse the repository at this point in the history
  5. Add MAX6675_*_IS_MAX318*5

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    32f8816 View commit details
    Browse the repository at this point in the history
  6. tweak formatting

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    cd1f907 View commit details
    Browse the repository at this point in the history
  7. MAX31865_SENSOR_OHMS_0 and MAX31865_SENSOR_OHMS_1

    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    547bb14 View commit details
    Browse the repository at this point in the history
  8. corrected comment

    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    f54e343 View commit details
    Browse the repository at this point in the history
  9. More adjustments

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    308c18f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5be2242 View commit details
    Browse the repository at this point in the history
  11. Fix maxref flag

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    a57bf41 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0564506 View commit details
    Browse the repository at this point in the history
  13. Support neg temps on TEMP_SENSOR_1 for MAX31855

    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    e71c2b7 View commit details
    Browse the repository at this point in the history
  14. fix HAS_MULTIP_6675 null condition & compiler warning

    In temperature.h if HAS_MULTI_6675 does not have a 1 after it. HAS_MULTI_6675 is defined as NUL
    
    In temperature.cpp  when Thermocouple is open the max6675_temp value is meant to have a TMAX * 4 so I added the pair of parentheses so the compiler would stop throwing a waring message about the statement being a binary statement.
    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    72d680b View commit details
    Browse the repository at this point in the history
  15. TERN0 to TERN1 so errors get checked for MAX31855

    GadgetAngel authored and thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    f778c1b View commit details
    Browse the repository at this point in the history
  16. Fix macro

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    70f0da5 View commit details
    Browse the repository at this point in the history
  17. Update 'fault' logic

    thinkyhead committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    99713e4 View commit details
    Browse the repository at this point in the history