فهرست منبع

Report state of fsensor into the MMU code

D.R.racer 3 سال پیش
والد
کامیت
1211ad9360
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Firmware/mmu2_fsensor.cpp

+ 2 - 2
Firmware/mmu2_fsensor.cpp

@@ -1,10 +1,10 @@
 #include "mmu2_fsensor.h"
+#include "Filament_sensor.h"
 
 namespace MMU2 {
 
 FilamentState WhereIsFilament(){
-    // @@TODO
-    return FilamentState::IN_NOZZLE;
+    return fsensor.getFilamentPresent() ? FilamentState::IN_NOZZLE : FilamentState::NOT_PRESENT;
 }
 
 // on AVR this does nothing