so the long running roof issues I've been having are best summed up in this video. long story short. close roof one night after getting home and the roof closes over and wouldn't lock. then it wouldn't do crap all. apart from the video. I replaced the motor (the old one i still have an had NO rust or damage) still the same.

anyway this smacks of a sensor issue. There are 4 sensors on the car. 2 in the roof above the passenger in the frame at the front and 2 on the frame on the passenger side just by the door. (you can see one)
The roof sensors were my first investigation as they are the easier to get to. To get into these you have to remove the inner rood lining which is 6 screws to remove the inside cowl. with this removed you can access the wiring loom. to get to the actual sensors you have to take the actual roof material off. this is done by undoing more screws that are under the inner roof lining trim.
After testing the sensors i looked at the loom. there are 3 wires. one power feed ~10.5V and 2 returns. by measuring voltage over the input and 1 return you can measure the 10.5V. i found one was working and one did not. if you open the roof i was able to get a voltage reading out of both. as you close the roof the point at which it stops the voltage reading stops. this indicated a broken wire.
replacing these wires is tricky and required all of the trim and the main roof bolts to be removed. i fed a new wire up the sheathing and splced it into the to two plugs as i did not have replacement AMP crimps using a inine heatshrink butt connector. reconnected the wiring, bolted all the roof back down and stuck all the trim on and now the roof works 100%
so to recap if your roof does what mine was doing then its probably the wiring to the 2 sensors in the roof.
anyway this smacks of a sensor issue. There are 4 sensors on the car. 2 in the roof above the passenger in the frame at the front and 2 on the frame on the passenger side just by the door. (you can see one)
The roof sensors were my first investigation as they are the easier to get to. To get into these you have to remove the inner rood lining which is 6 screws to remove the inside cowl. with this removed you can access the wiring loom. to get to the actual sensors you have to take the actual roof material off. this is done by undoing more screws that are under the inner roof lining trim.
After testing the sensors i looked at the loom. there are 3 wires. one power feed ~10.5V and 2 returns. by measuring voltage over the input and 1 return you can measure the 10.5V. i found one was working and one did not. if you open the roof i was able to get a voltage reading out of both. as you close the roof the point at which it stops the voltage reading stops. this indicated a broken wire.
replacing these wires is tricky and required all of the trim and the main roof bolts to be removed. i fed a new wire up the sheathing and splced it into the to two plugs as i did not have replacement AMP crimps using a inine heatshrink butt connector. reconnected the wiring, bolted all the roof back down and stuck all the trim on and now the roof works 100%
so to recap if your roof does what mine was doing then its probably the wiring to the 2 sensors in the roof.