tonesto7
Well-known member
- Thread starter
- #61
It's the font size... I have a release pending that will address the font on smaller screens...Thanks for the update! The formatting for the tire pressure is still not working on a small screen. If I change your function as below (break it up into 2 rows manually) it works. For some reason it doesn't like the /n on the smaller displays. The same thing happens with the position, it doesn't wrap to the 2nd line using the medium widget size. Works fine using large widget.
async function createTireElement(srcField, vehicleData) {
let offset = 0;
let titleFld = await createRow(srcField);
await createTitle(titleFld, 'tirePressure');
let dataFld1 = await createRow(srcField);
let value1 = `${vehicleData.tirePressure['leftFront']} | ${vehicleData.tirePressure['rightFront']}`;
let txt1 = await createText(dataFld1, value1, { font: new Font('Menlo-Regular', sizes.detailFontSizeMedium), textColor: new Color(runtimeData.textColor2), lineLimit: 1 });
let dataFld2 = await createRow(srcField);
let value2 = `${vehicleData.tirePressure['leftRear']} | ${vehicleData.tirePressure['rightRear']}`;
let txt2 = await createText(dataFld2, value2, { font: new Font('Menlo-Regular', sizes.detailFontSizeMedium), textColor: new Color(runtimeData.textColor2), lineLimit: 1 });
srcField.addSpacer(offset);
}
Also, there is a mistake in the utility function for the tire pressure setting. It needs to be an && (usePSI AND useMetric), or pull the 2nd condition completely since the default is psi anyway:
async function pressureToFixed(pressure, digits) {
if (!(await usePsiUnit()) && (await useMetricUnits())) {
return pressure || -1;
} else {
return pressure ? (pressure * 0.145).toFixed(digits) : -1;
}
}
As for the oil like and fuel gauge bar I mentioned before not working, they both showed up correctly once I took my truck for a drive, and now display properly.
Once again, GREAT WORK!!
I'm waiting on some data to address some missing data for Mach-E's... Hopefully releasing tonight
Sponsored