1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Robo C2 and LCD temp bug for dual extruders

Discussion in 'Software' started by OutsourcedGuru, Sep 6, 2017.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    139
    Hey @mark tomlinson , and this is probably what you're looking for...

    ~/oprint/local/lib/python2.7/site-packages/RoboLCD/lcd/printerstatus.py (noting that there's a .pyc compiled version in the same folder)

    Search ahead for this stuff:
    Code:
       def detirmine_layout(self):
            printer_type = roboprinter.printer_instance._settings.global_get(['printerProfiles', 'defaultProfile'])
            model = printer_type['model']
            tool0 = False
            tool1 = False
            bed = False
    
           if printer_type['extruder']['count'] == 1:
                tool0 = True
            elif printer_type['extruder']['count'] > 1:
                tool0 = True
                tool1 = True
            if printer_type['heatedBed']:
                bed = True
          
            if tool0 and tool1 and bed:
                tool_0 = Tool_Status("Extruder 1 Temp", "tool0")
                tool_1 = Tool_Status("Extruder 2 Temp", "tool1")
                bed = Tool_Status("Bed Temp", "bed")
                self.ids.tools.add_widget(tool_0)
                self.ids.tools.add_widget(tool_1)
                self.ids.tools.add_widget(bed)
            elif tool0 and bed:
                tool_0 = Tool_Status("Extruder 1 Temp", "tool0")
                bed = Tool_Status("Bed Temp", "bed")
                self.ids.tools.add_widget(tool_0)
                self.ids.tools.add_widget(Label())
                self.ids.tools.add_widget(bed)
            elif tool0:
                tool_0 = Tool_Status("Extruder 1 Temp", "tool0")
                self.ids.tools.add_widget(Label())
                self.ids.tools.add_widget(tool_0)
                self.ids.tools.add_widget(Label())
            else:
                Logger.info("##################### TOOL STATUS ERROR #######################")
    
    So in your case, here's the state of those three boolean variables:

    tool0 = true
    tool1 = true
    bed = false

    Unfortunately, there isn't a paragraph dedicated to that eventuality. You're either an R2-like printer that has two extruders and a heated bed or you're a C2-like printer. You'll want to add this:

    Code:
            elif tool0 and tool1 and bed:
                tool_0 = Tool_Status("Extruder 1 Temp", "tool0")
                tool_1 = Tool_Status("Extruder 2 Temp", "tool1")
                bed = Tool_Status("Bed Temp", "bed")
                self.ids.tools.add_widget(tool_0)
                self.ids.tools.add_widget(tool_1)
                self.ids.tools.add_widget(bed)
    
    Can't tell you if it needs a label() addition. Not sure when it compiles the python code but I'm thinking it does this on startup. You might need to rename the .pyc version for that to happen, though.
     
    #1 OutsourcedGuru, Sep 6, 2017
    Last edited: Sep 7, 2017
    mark tomlinson likes this.
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,817
    Likes Received:
    3,539
    You just delete the .pyc file(s) and it will recompile when it runs the first time.
     
    OutsourcedGuru likes this.
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,338
    Likes Received:
    7,035
    I'll try it after I get the printers back up (after Irma and after the workshop is complete -- which at this point is sometime after Irma)
     
  4. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    139
    I think I'll take the earthquakes, as preferences go. (Hope it misses you.)

    True story:
    Working in Los Angeles, 48th floor, and I'm supposed to be bringing in Eric Goldreich (my new boss) for his first day. Lobby tells me he's down there so I go to fetch him. Express elevator, a few people in there with Eric and myself as it starts rocketing back to 48. Elevator starts slamming the sides of the rails... BAM BAM BAM ...on the way up. Eric starts in with "jeez, our elevators in New York are built much better than this..."

    Without missing a beat I calmly say, "Eric, that's called an earthquake." Perfectly timed, the doors open to show that we've landed a full foot above the actual floor level. I turn to face him, smile and say, "Welcome to California" then jump down and leave him standing there with his mouth open.

    Maybe a week later, we're talking in the hallways and another quake starts in. The building (at 48 floors up) moves sideways like 6" at least back/forth so it's like being on some sort of amusement park ride. He's white as a sheet by this point as I continue to talk to him while covering my coffee cup with my free hand.

    :D

    Achievement.png
     

Share This Page