whirlpool gas dryer starts heating

I have a gas Whirlpool dryer model LGR5636LQ0. When it is first turned on in automatic dry, it turns over , the pilot light glows, the gas comes on ignites and it (the dryer) gets hot. The gas stays on for a few minutes (assume till it reaches 155 deg) then the gas shuts off and never comes on again and keeps spinning the clothes blowing cold air. If you shut it off and restart, you get the same problem. The thermostat heater measures 7.1k ohms, and all the thermostats measure 0 (NC) the timer has been replace with a new one. Anyone with a clue of what is going on. I read somewhere that it had a moisture sensor that shuts off the timer till the moisture is at a certain level. can not find anything on the wiring diagram that was taped inside the unit.

Blower switch would not turn off and there was smoke coming through the switch. Thinking the motor was burning out turned off ectricity. Can still smell electictrical burning.
Is this worth fixing?