gonzopi

git clone https://git.tarina.org/gonzopi
Log | Files | Refs | README | LICENSE

commit b51f09d0fd0750c4b6d5fd6e5ce96aa93921fd88
parent 3e60ba6cc22eb82bb93aba8620f9789b6a1fc3c0
Author: rbckman <rob@tarina.org>
Date:   Sat, 19 Apr 2025 17:44:41 +0100

new way of shooting, more traditional while keeping the funcionality of retake, also trying out a new font in gui

Diffstat:
Mgonzopi.py | 25+++++++++++++++++--------
Agui/VTV323.ttf | 0
Agui/firacode.ttf | 0
Rgui/src/fixedsys.ttf -> gui/fixedsys.ttf | 0
Mgui/gonzopi_menu.py | 30+++++++++++++++++++++++-------
5 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/gonzopi.py b/gonzopi.py @@ -145,6 +145,8 @@ def main(): #gonzopictrlmenu = "BACK","CAMERA:", "Add CAMERA","New FILM","","New SCENE","Sync SCENE","Snapshot" emptymenu='','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','' menu = standardmenu + hide_menu_time=4 + showmenutime = time.time()+6 showgonzopictrl = False recordwithports = False pressagain = '' @@ -191,7 +193,7 @@ def main(): showmenu = 1 showmenu_settings = True showhelp = False - oldchecksync = '' + oldchecksync = 0 overlay = None overlay2 = None underlay = None @@ -2171,9 +2173,16 @@ def main(): else: camerared = str(float(camera.awb_gains[0]))[:4] camerablue = str(float(camera.awb_gains[1]))[:4] - + if time.time() - showmenutime > hide_menu_time: + #showmenutime = time.time() + showmenu=0 + showmenu_settings = False + rendermenu=True #Check if menu is changed and save settings / sec if buttonpressed == True or recording == True or rendermenu == True: + if buttonpressed == True and recording == False: + showmenu=1 + showmenutime = time.time() lastmenu = menu[selected] if showgonzopictrl == False: menu = standardmenu @@ -2228,12 +2237,12 @@ def main(): vumetermessage('filming with '+camera_model +' ip:'+ network + ' '+camerasconnected) disk = os.statvfs(filmfolder) diskleft = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 / 1024)) + 'Gb' - checksync = str(int(disk.f_bavail * disk.f_frsize / 1024 / 1024 )) + 'Mb' - if checksync == oldchecksync: - rectime = '' - else: - rectime = 'SYNCING.. ' - oldchecksync = checksync + #checksync = int(disk.f_bavail * disk.f_frsize / 1024 / 1024 ) + #if checksync == oldchecksync: + # rectime = str(checksync)+'Mb/s' + #elif checksync - oldchecksync > 1000: + # rectime = 'SYNCING.. ' + #oldchecksync = checksync #print(term.yellow+'filming with '+camera_model +' ip:'+ network print(camselected,camera_recording,cameras) #writemessage(pressed) diff --git a/gui/VTV323.ttf b/gui/VTV323.ttf Binary files differ. diff --git a/gui/firacode.ttf b/gui/firacode.ttf Binary files differ. diff --git a/gui/src/fixedsys.ttf b/gui/fixedsys.ttf Binary files differ. diff --git a/gui/gonzopi_menu.py b/gui/gonzopi_menu.py @@ -59,6 +59,11 @@ moverow = 0 oldmenu="" oldvumeter="" hidemenu=False +#font='VTV323' +#font='VeraMono' +#font='fixedsys' +font='firacode' + if display_width == 1920: y_offset2 = 5 y_offset3 = 45 @@ -79,17 +84,28 @@ if display_width == 800: y_offset6 = 450 y_offset = 465 rectime = 700 - text_size = 15 - text_size_selected = 11 - space = 10 - morespace = 5 + if font == 'VeraMono': + text_size = 15 + text_size_selected = 11 + space = 10 + morespace = 5 + if font == 'VTV323': + text_size = 19 + text_size_selected = 15 + space = 9 + morespace = 5 + else: + text_size = 15 + text_size_selected = 11 + space = 10 + morespace = 5 moverow = 0 -fontObj = pygame.font.Font("/home/pi/gonzopi/gui/VeraMono.ttf", text_size,bold=True) +fontObj = pygame.font.Font("/home/pi/gonzopi/gui/"+font+'.ttf', text_size,bold=True) def render_menu(text, size, row, y_offset, color, bakg): t = fontObj.render(text, True, color) - rect = t.get_rect().move(row,y_offset).inflate(0,-3) + rect = t.get_rect().move(row,y_offset).inflate(0,-4) #print(rect) pygame.draw.rect(pygame_surface, bakg, rect) #pygame_surface.set_alpha(55) @@ -128,7 +144,7 @@ while True: render_vumenu(vumeter, text_size, 0, y_offset, color, bakg) oldvumeter = vumeter vumenulayer.updateLayer() - if menu != oldmenu: + if menu != oldmenu and menu != '': pygame_surface.fill((0,0,0,0)) #print(menu) #text1 = fontObj.render(menu[3], True, WHITE, BLUE)