M106 linear scaling between L and X
-
I created a fan output with
M950 F4 C"PE3" Q100 M106 P4 S0 H-1 L50 X255 C"CPAP"
But when controlling it S[1-50] all set the speed to 50, which makes some sense, as L told it it should start at 50, but is there a way to make it so S0 is off, S1 is converted to 50, and everything from S1-255 is mapped to return 50-255 instead?
My hope is to be able to control the fan normally from S0 to S255, and it then be mapped to something like
M106 S0 > 0 M106 S1 > 50 M106 S2 > 51 M106 S3 > 52 M106 S4 > 52 M106 S5 > 53 M106 S6 > 54 M106 S7 > 55 M106 S8 > 56 M106 S9 > 56 M106 S10 > 57 M106 S11 > 58 M106 S12 > 59 M106 S13 > 60 M106 S14 > 60 M106 S15 > 61 M106 S16 > 62 M106 S17 > 63 M106 S18 > 64 M106 S19 > 65 M106 S20 > 65 M106 S21 > 66 M106 S22 > 67 M106 S23 > 68 M106 S24 > 69 M106 S25 > 69 M106 S26 > 70 M106 S27 > 71 M106 S28 > 72 M106 S29 > 73 M106 S30 > 73 M106 S31 > 74 M106 S32 > 75 M106 S33 > 76 M106 S34 > 77 M106 S35 > 77 M106 S36 > 78 M106 S37 > 79 M106 S38 > 80 M106 S39 > 81 M106 S40 > 81 M106 S41 > 82 M106 S42 > 83 M106 S43 > 84 M106 S44 > 85 M106 S45 > 86 M106 S46 > 86 M106 S47 > 87 M106 S48 > 88 M106 S49 > 89 M106 S50 > 90 M106 S51 > 90 M106 S52 > 91 M106 S53 > 92 M106 S54 > 93 M106 S55 > 94 M106 S56 > 94 M106 S57 > 95 M106 S58 > 96 M106 S59 > 97 M106 S60 > 98 M106 S61 > 98 M106 S62 > 99 M106 S63 > 100 M106 S64 > 101 M106 S65 > 102 M106 S66 > 102 M106 S67 > 103 M106 S68 > 104 M106 S69 > 105 M106 S70 > 106 M106 S71 > 106 M106 S72 > 107 M106 S73 > 108 M106 S74 > 109 M106 S75 > 110 M106 S76 > 111 M106 S77 > 111 M106 S78 > 112 M106 S79 > 113 M106 S80 > 114 M106 S81 > 115 M106 S82 > 115 M106 S83 > 116 M106 S84 > 117 M106 S85 > 118 M106 S86 > 119 M106 S87 > 119 M106 S88 > 120 M106 S89 > 121 M106 S90 > 122 M106 S91 > 123 M106 S92 > 123 M106 S93 > 124 M106 S94 > 125 M106 S95 > 126 M106 S96 > 127 M106 S97 > 127 M106 S98 > 128 M106 S99 > 129 M106 S100 > 130 M106 S101 > 131 M106 S102 > 132 M106 S103 > 132 M106 S104 > 133 M106 S105 > 134 M106 S106 > 135 M106 S107 > 136 M106 S108 > 136 M106 S109 > 137 M106 S110 > 138 M106 S111 > 139 M106 S112 > 140 M106 S113 > 140 M106 S114 > 141 M106 S115 > 142 M106 S116 > 143 M106 S117 > 144 M106 S118 > 144 M106 S119 > 145 M106 S120 > 146 M106 S121 > 147 M106 S122 > 148 M106 S123 > 148 M106 S124 > 149 M106 S125 > 150 M106 S126 > 151 M106 S127 > 152 M106 S128 > 152 M106 S129 > 153 M106 S130 > 154 M106 S131 > 155 M106 S132 > 156 M106 S133 > 157 M106 S134 > 157 M106 S135 > 158 M106 S136 > 159 M106 S137 > 160 M106 S138 > 161 M106 S139 > 161 M106 S140 > 162 M106 S141 > 163 M106 S142 > 164 M106 S143 > 165 M106 S144 > 165 M106 S145 > 166 M106 S146 > 167 M106 S147 > 168 M106 S148 > 169 M106 S149 > 169 M106 S150 > 170 M106 S151 > 171 M106 S152 > 172 M106 S153 > 173 M106 S154 > 173 M106 S155 > 174 M106 S156 > 175 M106 S157 > 176 M106 S158 > 177 M106 S159 > 178 M106 S160 > 178 M106 S161 > 179 M106 S162 > 180 M106 S163 > 181 M106 S164 > 182 M106 S165 > 182 M106 S166 > 183 M106 S167 > 184 M106 S168 > 185 M106 S169 > 186 M106 S170 > 186 M106 S171 > 187 M106 S172 > 188 M106 S173 > 189 M106 S174 > 190 M106 S175 > 190 M106 S176 > 191 M106 S177 > 192 M106 S178 > 193 M106 S179 > 194 M106 S180 > 194 M106 S181 > 195 M106 S182 > 196 M106 S183 > 197 M106 S184 > 198 M106 S185 > 199 M106 S186 > 199 M106 S187 > 200 M106 S188 > 201 M106 S189 > 202 M106 S190 > 203 M106 S191 > 203 M106 S192 > 204 M106 S193 > 205 M106 S194 > 206 M106 S195 > 207 M106 S196 > 207 M106 S197 > 208 M106 S198 > 209 M106 S199 > 210 M106 S200 > 211 M106 S201 > 211 M106 S202 > 212 M106 S203 > 213 M106 S204 > 214 M106 S205 > 215 M106 S206 > 215 M106 S207 > 216 M106 S208 > 217 M106 S209 > 218 M106 S210 > 219 M106 S211 > 219 M106 S212 > 220 M106 S213 > 221 M106 S214 > 222 M106 S215 > 223 M106 S216 > 224 M106 S217 > 224 M106 S218 > 225 M106 S219 > 226 M106 S220 > 227 M106 S221 > 228 M106 S222 > 228 M106 S223 > 229 M106 S224 > 230 M106 S225 > 231 M106 S226 > 232 M106 S227 > 232 M106 S228 > 233 M106 S229 > 234 M106 S230 > 235 M106 S231 > 236 M106 S232 > 236 M106 S233 > 237 M106 S234 > 238 M106 S235 > 239 M106 S236 > 240 M106 S237 > 240 M106 S238 > 241 M106 S239 > 242 M106 S240 > 243 M106 S241 > 244 M106 S242 > 245 M106 S243 > 245 M106 S244 > 246 M106 S245 > 247 M106 S246 > 248 M106 S247 > 249 M106 S248 > 249 M106 S249 > 250 M106 S250 > 251 M106 S251 > 252 M106 S252 > 253 M106 S253 > 253 M106 S254 > 254 M106 S255 > 255
Current behavior verified by sending
M106 P4 S10 M106 P4 Fan 4 (CPAP), speed 3%, min: 19%, max: 100%, blip: 0.10
-
@Mikey No, I think you are a bit stuck. My understanding from the documentation is that the fan control is essentially a straight line slope between 0 and 100% speed vs PWM, but you can clip is such that all non-zero values below "L" are set to whatever "L" is and any values above "X" are clipped to whatever "X" is. So in your case 0 should be off, but all values above zero up to 50 will be at 50. From then on it'll ramp up following the original straight line slope from zero to 100% until it reaches "X". What you want to do is add an offset but also change the angle of the slope, which I don't think is currently possible.
EDIT. But I note that you've posted this in the "firmware wish list" section, which is the right place.
-
@Mikey the behaviour is intentional. If the slicer asks for 20% fan speed but the minimum your fan can do is 30%, then you will get 30% which is the available value closest to the one requested by the slicer. If the slicer requests 30% then you will also get 30%, not 51% which is what your scheme would provide.
RRF does scale the PWM according to the X parameter that you provide, because the purpose of the X parameter is to specify the maximum PWM that you ever want to use.