If the MAP sensor sees low pressure that doesn't match with the MAF (lookup table), it will throw a code. The smoke control/fuel limiting is almost all done on the MAF on these motors, but the baro sensor can limit things too.
It is possible your MAF sensor is intermittent, and it really did read 100 the other day, and 300 now. That could be your problem. It really sounds like you need to get someone with EFILive to get a log of your truck when it is running badly, and we can go over the hard data.
The part that gets me is you say when it is running badly, it smokes. That tells me the computer is trying to inject the right amount of fuel as if everything is fine, but something mechanical is wrong causing low power. An EFILive log will answer that, just record main fuel rate. All the diagnostics can be done with the Edge, but it is exceedingly hard to do that way.