Merge branch 'master' of github.com:akatrevorjay/edid-generator

* 'master' of github.com:akatrevorjay/edid-generator:
  added -a paramter to local & removed debugging statements
  removed local -a from creating of variable lines. kept crashing under ubuntu 14.04
  failed because version of edid-decode had leading spaces in front of Checksum.  added pattern that matches leading spaces
This commit is contained in:
Trevor Joynson (trevorj)
2017-12-21 21:58:44 -08:00
2 changed files with 14 additions and 17 deletions

View File

@@ -62,33 +62,30 @@ template-S() {
esac
local -A defines
defines=(
TIMING_NAME "${(qqq)name}"
CLOCK "$pixel_clock_khz"
XPIX "$hdisp"
XBLANK "$((htotal - hdisp))"
XOFFSET "$((hsyncstart - hdisp))"
XPULSE "$((hsyncend - hsyncstart))"
YPIX "$vdisp"
YBLANK "$((vtotal - vdisp))"
YOFFSET "(63+$((vsyncstart - vdisp)))"
YPULSE "(63+$((vsyncend - vsyncstart)))"
VERSION "${edid_version%%.*}"
REVISION "${edid_version#*.}"
CLOCK "$pixel_clock_khz"
XPIX "$hdisp"
YPIX "$vdisp"
XY_RATIO "XY_RATIO_${(U)ratio//:/_}"
XBLANK "$((htotal - hdisp))"
YBLANK "$((vtotal - vdisp))"
XOFFSET "$((hsyncstart - hdisp))"
XPULSE "$((hsyncend - hsyncstart))"
YOFFSET "(63+$((vsyncstart - vdisp)))"
YPULSE "(63+$((vsyncend - vsyncstart)))"
DPI "$dpi"
VFREQ "$vfreq_hz"
TIMING_NAME "${(qqq)name}"
HSYNC_POL "$hsync_polarity"
VSYNC_POL "$vsync_polarity"
)
local -a lines=('/* '"$name: $REPLY"' */')
local lines=('/* '"$name: $REPLY"' */') # removed -a option
local k
for k in ${(k)defines}; do
for k in "${(@k)defines}"; do
lines+=("#define $k ${defines[$k]}")
done
lines+=('#include "edid.S"')