I noted that in your code you do not use the same XY coordinates for both displays when displaying a string. So besides a pointer to the display object you should one way or the other also pass the right coordinates. One way to do this is to pass them explicitly (additional parameters) the other way is to pass them implicit (they are part of the LCD object) both have pro and cons.
Thank you. I have already done it. The finished code is much cleaner and I have eliminated two additional functions (lcdPrintDec, andPrintDigits):
if( now() != prevDisplay) //update the display only if the time has changed
{
prevDisplay = now();
digitalClockDisplay(lcd1, 10);
digitalClockDisplay(lcd2, 26);
sendPackets();
}
void digitalClockDisplay( LCD3Wire &lcd, int pos ){
lcd.cursorTo(2, pos);
lcd.printIn(dag[weekday()-1]);
lcd.print(' ');
lcd.printIn(itoa(day(),decBuffer, 10));
lcd.cursorTo(2,(pos-6));
// clock display of current time
if (hour() < 10)
lcd.print('0');
lcd.printIn(itoa(hour(),decBuffer, 10));
lcd.print(':');
if (minute() < 10)
lcd.print('0');
lcd.printIn(itoa(minute(),decBuffer, 10));
// printDigits(lcd, minute());
}