Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo TF-Team,

wenn man bei E-Paper Bricklet per e_paper_296x128_draw_text Text an der Position 0,0 ausgibt (links oben), dann ist die Schrift nicht ganz sichtbar, mit Ausnahme des kleinsten Fonts 6x8. Alle Anderen Fonts scheinen die Ziffern um einige Pixel zu hoch anzusetzen.

Ist das gewollt bzw. bekannt?

 

font_6x8.png

font_24x32.png

Geschrieben

Mh, in der Tat. Sieht im Code so aus als würden wir bei der 6x8 Schriftgröße oben links starten und dann von da skalieren. Was natürlich nicht besonders intuitiv ist.

void gui_draw_text_horizontal(const uint16_t column, const uint16_t row, const uint8_t text_length, const char *text, const uint8_t col_mul, const uint8_t row_mul, const uint8_t color) {
	for(uint8_t i = 0; i < text_length; i++) {
		for(uint8_t j = 0; j < 6; j++) {
			const uint8_t data = ((j == 5) ? 0 : font[(uint8_t)text[i]*5 + j]);
			for(uint8_t k = 0; k < 8; k++) {
				if(data & (1 << k)) {
					const uint16_t pixel_column = j*col_mul + column + i*6*col_mul;
					const uint16_t pixel_row    = k*row_mul+row;
					if((row_mul == 1) && (col_mul == 1)) {
						gui_set_pixel_color(pixel_column, pixel_row, color);
					} else {
						const int16_t x_end = pixel_column+col_mul-1;
						const int16_t y_end = pixel_row-row_mul+1;
						if((x_end < 0) || (y_end < 0)) {
							continue;
						}
						gui_draw_box(pixel_column, pixel_row, x_end, y_end, true, color);
					}
				}
			}
		}
	}
}

 

Ist echt blöd, wenn ich das jetzt ändere bricht das natürlich bestehenden Code.

Ich habs mir aufgeschrieben mir das nächstes Jahr anzugucken. Ich gehe dann durch und schaue auch ob wir woanders das gleiche Problem noch haben. Jetzt vor den Feiertagen schaffe ich es nicht mehr.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.