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

[FR] Auto Report Redundant Sensor option #23997

Closed
StreckerCM opened this issue Apr 5, 2022 · 4 comments
Closed

[FR] Auto Report Redundant Sensor option #23997

StreckerCM opened this issue Apr 5, 2022 · 4 comments
Labels
C: Temperatures Fix Included A fix is included in the description T: Feature Request Features requested by users.

Comments

@StreckerCM
Copy link

Is your feature request related to a problem? Please describe.

Marlin has the framework for this available but reporting the redundant sensor is hardcoded to false

Are you looking for hardware support?

N/A

Describe the feature you want

In temperature.h

Add a check for the auto-report redundant flag. If it is enabled, print_heater_states would have the include_r flag set to true if it is not, it would have it set to false.

`#if HAS_TEMP_SENSOR

#if  ENABLED(AUTO_REPORT_REDUNDANT)
  static void print_heater_states(const uint8_t target_extruder
  OPTARG(HAS_TEMP_REDUNDANT, const bool include_r=true)
  );
#else
  static void print_heater_states(const uint8_t target_extruder
  OPTARG(HAS_TEMP_REDUNDANT, const bool include_r=false)
  );
#endif
#if ENABLED(AUTO_REPORT_TEMPERATURES)
  struct AutoReportTemp { static void report(); };
  static AutoReporter<AutoReportTemp> auto_reporter;
#endif

#endif`

In Configuration_adv.h

Add a condition that if AUTO_REPORT_TEMPERATURES is enabled and TEMP_SENSOR_REDUNDANT is defined. If those conditions are met, then AUTO_REPORT_REDUNDANT can be enabled. By default, AUTO_REPORT_REDUNDANT would be commented out and would be an option to be enabled when configuring Marlin

`/**

  • Auto-report temperatures with M155 S
    */
    #define AUTO_REPORT_TEMPERATURES

#if TEMP_SENSOR_REDUNDANT && ENABLED(AUTO_REPORT_TEMPERATURES)
//#define AUTO_REPORT_REDUNDANT //Enabled if you are using a redundant temperature sensor and want to auto report the value
#endif`

Additional context

No response

@StreckerCM StreckerCM added the T: Feature Request Features requested by users. label Apr 5, 2022
@thisiskeithb thisiskeithb added Fix Included A fix is included in the description C: Temperatures labels Apr 6, 2022
@thisiskeithb
Copy link
Member

Have you tried your patch? If it works, it'd be faster if you submitted a Pull Request so it can be reviewed.

thinkyhead added a commit to thinkyhead/Marlin that referenced this issue Apr 10, 2022
thinkyhead added a commit to thinkyhead/Marlin that referenced this issue Apr 10, 2022
@thinkyhead thinkyhead changed the title [FR] Add a new flag in Configuration_adv.h to enable auto reporting the reading of a redundant tempurature sensor [FR] Auto Report Redundant Sensor option Apr 10, 2022
@thinkyhead
Copy link
Member

This was simple enough to implement on the fly. See the PR linked above.

@StreckerCM
Copy link
Author

@thinkyhead Thank you! Your solution is a little more elegant than mine.
@thisiskeithb I read the contribution page but had not gotten the time to make the patch before @thinkyhead did.

I appreciate the help!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: Temperatures Fix Included A fix is included in the description T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

3 participants